diff --git a/Podfile b/Podfile index 8c24c0e..d16e20e 100644 --- a/Podfile +++ b/Podfile @@ -6,7 +6,7 @@ target 'ShadowsocksX-NG' do use_frameworks! # Pods for ShadowsocksX-NG - pod 'Alamofire', '~> 4.0' + pod 'Alamofire', '~> 4.0.1' pod 'GCDWebServer', '~> 3.0' target 'ShadowsocksX-NGTests' do diff --git a/Podfile.lock b/Podfile.lock index e7d4618..bb7c70c 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - Alamofire (4.0.0) + - Alamofire (4.0.1) - BRLOptionParser (0.3.1) - GCDWebServer (3.3.3): - GCDWebServer/Core (= 3.3.3) @@ -11,7 +11,7 @@ DEPENDENCIES: - GCDWebServer (~> 3.0) SPEC CHECKSUMS: - Alamofire: fef59f00388f267e52d9b432aa5d93dc97190f14 + Alamofire: 7682d43245de14874acd142ec137b144aa1dd335 BRLOptionParser: a03256a8ff003ca1f5376c55f55f210e085a3958 GCDWebServer: 1c39a1f0763e4eb492bee021e4270fce097d3555 diff --git a/Pods/Alamofire/README.md b/Pods/Alamofire/README.md index 38dad28..bfaed03 100644 --- a/Pods/Alamofire/README.md +++ b/Pods/Alamofire/README.md @@ -55,7 +55,7 @@ In order to keep Alamofire focused specifically on core networking implementatio ## Requirements -- iOS 9.0+ / Mac OS X 10.11+ / tvOS 9.0+ / watchOS 2.0+ +- iOS 9.0+ / macOS 10.11+ / tvOS 9.0+ / watchOS 2.0+ - Xcode 8.0+ - Swift 3.0+ @@ -242,7 +242,7 @@ Alamofire.request("https://httpbin.org/get").response { response in print("Response: \(response.response)") print("Error: \(response.data)") - if let data = data, let utf8Text = String(data: data, encoding: .utf8) { + if let data = response.data, let utf8Text = String(data: data, encoding: .utf8) { print("Data: \(utf8Text)") } } @@ -311,7 +311,7 @@ Alamofire.request("https://httpbin.org/get") #### Response Handler Queue -Reponse handlers by default are executed on the main dispatch queue. However, a custom dispatch queue can be provided instead. +Response handlers by default are executed on the main dispatch queue. However, a custom dispatch queue can be provided instead. ```swift let utilityQueue = DispatchQueue.global(qos: .utility) @@ -1362,9 +1362,9 @@ extension DataRequest { guard error == nil else { return .failure(BackendError.network(error: error!)) } // Use Alamofire's existing data serializer to extract the data, passing the error as nil, as it has - // alreaady been handled. + // already been handled. let result = Request.serializeResponseData(response: response, data: data, error: nil) - + guard case let .success(validData) = result else { return .failure(BackendError.dataSerialization(error: result.error! as! AFError)) } @@ -1413,7 +1413,7 @@ extension DataRequest { let jsonResponseSerializer = DataRequest.jsonResponseSerializer(options: .allowFragments) let result = jsonResponseSerializer.serializeResponse(request, response, data, nil) - + guard case let .success(jsonObject) = result else { return .failure(BackendError.jsonSerialization(error: result.error!)) } @@ -1498,7 +1498,7 @@ extension DataRequest { let jsonSerializer = DataRequest.jsonResponseSerializer(options: .allowFragments) let result = jsonSerializer.serializeResponse(request, response, data, nil) - + guard case let .success(jsonObject) = result else { return .failure(BackendError.jsonSerialization(error: result.error!)) } @@ -1696,7 +1696,7 @@ There are some important things to remember when using network reachability to d ## Open Radars -The following radars have some affect on the current implementation of Alamofire. +The following radars have some effect on the current implementation of Alamofire. - [`rdar://21349340`](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case - [`rdar://26761490`](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage @@ -1735,7 +1735,7 @@ The [ASF](https://github.com/Alamofire/Foundation#members) is looking to raise m - Potentially fund test servers to make it easier for us to test the edge cases - Potentially fund developers to work on one of our projects full-time -The community adoption of the ASF libraries has been amazing. We are greatly humbled by your enthusiam around the projects, and want to continue to do everything we can to move the needle forward. With your continued support, the ASF will be able to improve its reach and also provide better legal safety for the core members. If you use any of our libraries for work, see if your employers would be interested in donating. Our initial goal is to raise $1000 to get all our legal ducks in a row and kickstart this campaign. Any amount you can donate today to help us reach our goal would be greatly appreciated. +The community adoption of the ASF libraries has been amazing. We are greatly humbled by your enthusiasm around the projects, and want to continue to do everything we can to move the needle forward. With your continued support, the ASF will be able to improve its reach and also provide better legal safety for the core members. If you use any of our libraries for work, see if your employers would be interested in donating. Our initial goal is to raise $1000 to get all our legal ducks in a row and kickstart this campaign. Any amount you can donate today to help us reach our goal would be greatly appreciated. Click here to lend your support to: Alamofire Software Foundation and make a donation at pledgie.com ! diff --git a/Pods/Alamofire/Source/AFError.swift b/Pods/Alamofire/Source/AFError.swift index 836d1f9..82e8a25 100644 --- a/Pods/Alamofire/Source/AFError.swift +++ b/Pods/Alamofire/Source/AFError.swift @@ -144,7 +144,7 @@ extension AFError { /// Returns whether the AFError is a parameter encoding error. When `true`, the `underlyingError` property will /// contain the associated value. public var isParameterEncodingError: Bool { - if case .multipartEncodingFailed = self { return true } + if case .parameterEncodingFailed = self { return true } return false } @@ -297,8 +297,8 @@ extension AFError.ResponseValidationFailureReason { var responseContentType: String? { switch self { - case .unacceptableContentType(_, let reponseType): - return reponseType + case .unacceptableContentType(_, let responseType): + return responseType default: return nil } diff --git a/Pods/Alamofire/Source/Alamofire.swift b/Pods/Alamofire/Source/Alamofire.swift index 92845b3..7566587 100644 --- a/Pods/Alamofire/Source/Alamofire.swift +++ b/Pods/Alamofire/Source/Alamofire.swift @@ -24,7 +24,7 @@ import Foundation -/// Types adopting the `URLConvertible` protocol can be used to construct URLs, which are then used to construct +/// Types adopting the `URLConvertible` protocol can be used to construct URLs, which are then used to construct /// URL requests. public protocol URLConvertible { /// Returns a URL that conforms to RFC 2396 or throws an `Error`. @@ -241,7 +241,7 @@ public func download( // MARK: File -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` /// for uploading the `file`. /// /// - parameter file: The file to upload. @@ -275,7 +275,7 @@ public func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> Up // MARK: Data -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` /// for uploading the `data`. /// /// - parameter data: The data to upload. @@ -309,7 +309,7 @@ public func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> Uplo // MARK: InputStream -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` /// for uploading the `stream`. /// /// - parameter stream: The stream to upload. diff --git a/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift b/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift index dafe862..5019d0d 100644 --- a/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift +++ b/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift @@ -23,6 +23,7 @@ // import Dispatch +import Foundation extension DispatchQueue { static var userInteractive: DispatchQueue { return DispatchQueue.global(qos: .userInteractive) } diff --git a/Pods/Alamofire/Source/MultipartFormData.swift b/Pods/Alamofire/Source/MultipartFormData.swift index 35a4d1f..1ce4d19 100644 --- a/Pods/Alamofire/Source/MultipartFormData.swift +++ b/Pods/Alamofire/Source/MultipartFormData.swift @@ -26,7 +26,7 @@ import Foundation #if os(iOS) || os(watchOS) || os(tvOS) import MobileCoreServices -#elseif os(OSX) +#elseif os(macOS) import CoreServices #endif diff --git a/Pods/Alamofire/Source/SessionDelegate.swift b/Pods/Alamofire/Source/SessionDelegate.swift index a782786..4549731 100644 --- a/Pods/Alamofire/Source/SessionDelegate.swift +++ b/Pods/Alamofire/Source/SessionDelegate.swift @@ -159,7 +159,7 @@ open class SessionDelegate: NSObject { /// /// - returns: `true` if the receiver implements or inherits a method that can respond to selector, otherwise `false`. open override func responds(to selector: Selector) -> Bool { - #if !os(OSX) + #if !os(macOS) if selector == #selector(URLSessionDelegate.urlSessionDidFinishEvents(forBackgroundURLSession:)) { return sessionDidFinishEventsForBackgroundURLSession != nil } @@ -247,7 +247,7 @@ extension SessionDelegate: URLSessionDelegate { completionHandler(disposition, credential) } -#if !os(OSX) +#if !os(macOS) /// Tells the delegate that all messages enqueued for a session have been delivered. /// diff --git a/Pods/Alamofire/Source/SessionManager.swift b/Pods/Alamofire/Source/SessionManager.swift index 376171b..1363125 100644 --- a/Pods/Alamofire/Source/SessionManager.swift +++ b/Pods/Alamofire/Source/SessionManager.swift @@ -64,7 +64,7 @@ open class SessionManager { }.joined(separator: ", ") // User-Agent Header; see https://tools.ietf.org/html/rfc7231#section-5.5.3 - // Example: `iOS Example/1.0 (com.alamofire.iOS-Example; build:1; iOS 9.3.0) Alamofire/3.4.2` + // Example: `iOS Example/1.0 (org.alamofire.iOS-Example; build:1; iOS 10.0.0) Alamofire/4.0.0` let userAgent: String = { if let info = Bundle.main.infoDictionary { let executable = info[kCFBundleExecutableKey as String] as? String ?? "Unknown" @@ -83,7 +83,7 @@ open class SessionManager { return "watchOS" #elseif os(tvOS) return "tvOS" - #elseif os(OSX) + #elseif os(macOS) return "OS X" #elseif os(Linux) return "Linux" diff --git a/Pods/Alamofire/Source/TaskDelegate.swift b/Pods/Alamofire/Source/TaskDelegate.swift index 32b6118..4a10b65 100644 --- a/Pods/Alamofire/Source/TaskDelegate.swift +++ b/Pods/Alamofire/Source/TaskDelegate.swift @@ -104,7 +104,8 @@ open class TaskDelegate: NSObject { } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { let host = challenge.protectionSpace.host - if let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicy(forHost: host), + if + let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicy(forHost: host), let serverTrust = challenge.protectionSpace.serverTrust { if serverTrustPolicy.evaluate(serverTrust, forHost: host) { diff --git a/Pods/Alamofire/Source/Validation.swift b/Pods/Alamofire/Source/Validation.swift index dc0eeb5..c405d02 100644 --- a/Pods/Alamofire/Source/Validation.swift +++ b/Pods/Alamofire/Source/Validation.swift @@ -162,7 +162,7 @@ extension DataRequest { /// - returns: The request. @discardableResult public func validate(_ validation: @escaping Validation) -> Self { - let validationExecution: () -> Void = { + let validationExecution: () -> Void = { [unowned self] in if let response = self.response, self.delegate.error == nil, @@ -186,7 +186,7 @@ extension DataRequest { /// - returns: The request. @discardableResult public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { - return validate { _, response, _ in + return validate { [unowned self] _, response, _ in return self.validate(statusCode: acceptableStatusCodes, response: response) } } @@ -200,7 +200,7 @@ extension DataRequest { /// - returns: The request. @discardableResult public func validate(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String { - return validate { _, response, data in + return validate { [unowned self] _, response, data in return self.validate(contentType: acceptableContentTypes, response: response, data: data) } } @@ -238,7 +238,7 @@ extension DownloadRequest { /// - returns: The request. @discardableResult public func validate(_ validation: @escaping Validation) -> Self { - let validationExecution: () -> Void = { + let validationExecution: () -> Void = { [unowned self] in let request = self.request let temporaryURL = self.downloadDelegate.temporaryURL let destinationURL = self.downloadDelegate.destinationURL @@ -266,7 +266,7 @@ extension DownloadRequest { /// - returns: The request. @discardableResult public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { - return validate { _, response, _, _ in + return validate { [unowned self] _, response, _, _ in return self.validate(statusCode: acceptableStatusCodes, response: response) } } @@ -280,7 +280,7 @@ extension DownloadRequest { /// - returns: The request. @discardableResult public func validate(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String { - return validate { _, response, _, _ in + return validate { [unowned self] _, response, _, _ in let fileURL = self.downloadDelegate.fileURL guard let validFileURL = fileURL else { diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock index e7d4618..bb7c70c 100644 --- a/Pods/Manifest.lock +++ b/Pods/Manifest.lock @@ -1,5 +1,5 @@ PODS: - - Alamofire (4.0.0) + - Alamofire (4.0.1) - BRLOptionParser (0.3.1) - GCDWebServer (3.3.3): - GCDWebServer/Core (= 3.3.3) @@ -11,7 +11,7 @@ DEPENDENCIES: - GCDWebServer (~> 3.0) SPEC CHECKSUMS: - Alamofire: fef59f00388f267e52d9b432aa5d93dc97190f14 + Alamofire: 7682d43245de14874acd142ec137b144aa1dd335 BRLOptionParser: a03256a8ff003ca1f5376c55f55f210e085a3958 GCDWebServer: 1c39a1f0763e4eb492bee021e4270fce097d3555 diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index 61b1f9d..ebf20f6 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -653,7 +653,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0700; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -785,7 +785,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = C18C5D68D2A979595D2A50A1D65A8AF2 /* Alamofire.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -845,8 +845,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 089EB7E66F64D3A19BB7681AFCE91031 /* Pods-ShadowsocksX-NG.release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -919,18 +918,14 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = 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 = YES; ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_RELEASE=1", "$(inherited)", @@ -944,8 +939,6 @@ MACOSX_DEPLOYMENT_TARGET = 10.11; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; SYMROOT = "${SRCROOT}/../build"; VALIDATE_PRODUCT = YES; }; @@ -955,7 +948,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 9BA2A0099476E08B6CC8026BDF0C603E /* Pods-ShadowsocksX-NGTests.debug.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -993,8 +986,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 98522BF2EB25C0255284080F9CA3E195 /* Pods-ShadowsocksX-NG.debug.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -1043,19 +1035,15 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = 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_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_DEBUG=1", @@ -1073,7 +1061,6 @@ ONLY_ACTIVE_ARCH = YES; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_VERSION = 3.0; SYMROOT = "${SRCROOT}/../build"; }; name = Debug; @@ -1082,7 +1069,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 24BCEE536E19B38E28CE6933A0D49A2D /* GCDWebServer.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -1141,7 +1128,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = F67191B1F87DA238C4D87250DFBE43DD /* Pods-ShadowsocksX-NGTests.release.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -1179,7 +1166,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 24BCEE536E19B38E28CE6933A0D49A2D /* GCDWebServer.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -1239,7 +1226,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = C18C5D68D2A979595D2A50A1D65A8AF2 /* Alamofire.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; diff --git a/Pods/Target Support Files/Alamofire/Info.plist b/Pods/Target Support Files/Alamofire/Info.plist index 3424ca6..b672cd7 100644 --- a/Pods/Target Support Files/Alamofire/Info.plist +++ b/Pods/Target Support Files/Alamofire/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.0.0 + 4.0.1 CFBundleSignature ???? CFBundleVersion