From 01cfc3efc43fee083ade3d1afe28f09d89e54177 Mon Sep 17 00:00:00 2001 From: Paul Thorsteinson Date: Sun, 18 Sep 2016 22:34:57 -0600 Subject: [PATCH 01/11] Initial commit --- .gitignore | 1 + Astro.podspec | 4 +- Astro.xcodeproj/project.pbxproj | 8 +- Astro/Logging/Log.swift | 48 +- Astro/Networking/HTTPStatusCode.swift | 242 ++++----- Astro/Networking/NetworkService.swift | 90 ++-- Astro/Networking/NetworkServiceLogger.swift | 40 +- Astro/Networking/Route.swift | 6 +- Astro/Security/KeychainAccess.swift | 48 +- Astro/UI/LayoutLabel.swift | 8 +- Astro/UI/NibLoadableView.swift | 2 +- Astro/UI/ReusableView.swift | 2 +- Astro/UI/UICollectionView+AstroGadgets.swift | 14 +- Astro/UI/UIColor+AstroGadgets.swift | 20 +- Astro/UI/UITableView+AstroGadgets.swift | 14 +- Astro/UI/UIViewController+AstroGadgets.swift | 12 +- Astro/Utils/Queue.swift | 44 +- .../Unit Tests/Logging/LoggerSpec.swift | 4 +- AstroTests/Unit Tests/SpecHelpers.swift | 8 +- .../Unit Tests/Utils/EnumCountableSpec.swift | 6 +- Podfile | 6 +- Pods/Local Podspecs/Astro.podspec.json | 8 +- .../Alamofire/Alamofire-dummy.m | 5 - .../Alamofire/Alamofire-prefix.pch | 4 - .../Alamofire/Alamofire-umbrella.h | 6 - .../Alamofire/Alamofire.modulemap | 6 - .../Alamofire/Alamofire.xcconfig | 9 - .../Target Support Files/Alamofire/Info.plist | 26 - Pods/Target Support Files/Astro/Astro-dummy.m | 5 - .../Astro/Astro-prefix.pch | 4 - .../Astro/Astro-umbrella.h | 6 - .../Astro/Astro.modulemap | 6 - .../Target Support Files/Astro/Astro.xcconfig | 11 - Pods/Target Support Files/Astro/Info.plist | 26 - .../Freddy/Freddy-dummy.m | 5 - .../Freddy/Freddy-prefix.pch | 4 - .../Freddy/Freddy-umbrella.h | 7 - .../Freddy/Freddy.modulemap | 6 - .../Freddy/Freddy.xcconfig | 9 - Pods/Target Support Files/Freddy/Info.plist | 26 - Pods/Target Support Files/Nimble/Info.plist | 26 - .../Nimble/Nimble-dummy.m | 5 - .../Nimble/Nimble-prefix.pch | 4 - .../Nimble/Nimble-umbrella.h | 10 - .../Nimble/Nimble.modulemap | 6 - .../Nimble/Nimble.xcconfig | 12 - Pods/Target Support Files/Nocilla/Info.plist | 26 - .../Nocilla/Nocilla-dummy.m | 5 - .../Nocilla/Nocilla-prefix.pch | 4 - .../Nocilla/Nocilla-umbrella.h | 18 - .../Nocilla/Nocilla.modulemap | 6 - .../Nocilla/Nocilla.xcconfig | 9 - .../Pods-Astro/Info.plist | 26 - .../Pods-Astro-acknowledgements.markdown | 85 ---- .../Pods-Astro-acknowledgements.plist | 127 ----- .../Pods-Astro/Pods-Astro-dummy.m | 5 - .../Pods-Astro/Pods-Astro-frameworks.sh | 97 ---- .../Pods-Astro/Pods-Astro-resources.sh | 102 ---- .../Pods-Astro/Pods-Astro-umbrella.h | 6 - .../Pods-Astro/Pods-Astro.debug.xcconfig | 10 - .../Pods-Astro/Pods-Astro.modulemap | 6 - .../Pods-Astro/Pods-Astro.release.xcconfig | 10 - .../Pods-AstroTests/Info.plist | 26 - .../Pods-AstroTests-acknowledgements.markdown | 437 ---------------- .../Pods-AstroTests-acknowledgements.plist | 475 ------------------ .../Pods-AstroTests/Pods-AstroTests-dummy.m | 5 - .../Pods-AstroTests-frameworks.sh | 95 ---- .../Pods-AstroTests-resources.sh | 102 ---- .../Pods-AstroTests-umbrella.h | 6 - .../Pods-AstroTests.debug.xcconfig | 10 - .../Pods-AstroTests/Pods-AstroTests.modulemap | 6 - .../Pods-AstroTests.release.xcconfig | 10 - Pods/Target Support Files/Quick/Info.plist | 26 - Pods/Target Support Files/Quick/Quick-dummy.m | 5 - .../Quick/Quick-prefix.pch | 4 - .../Quick/Quick-umbrella.h | 10 - .../Quick/Quick.modulemap | 6 - .../Target Support Files/Quick/Quick.xcconfig | 12 - .../Target Support Files/SwiftTask/Info.plist | 26 - .../SwiftTask/SwiftTask-dummy.m | 5 - .../SwiftTask/SwiftTask-prefix.pch | 4 - .../SwiftTask/SwiftTask-umbrella.h | 7 - .../SwiftTask/SwiftTask.modulemap | 6 - .../SwiftTask/SwiftTask.xcconfig | 9 - 84 files changed, 318 insertions(+), 2385 deletions(-) delete mode 100644 Pods/Target Support Files/Alamofire/Alamofire-dummy.m delete mode 100644 Pods/Target Support Files/Alamofire/Alamofire-prefix.pch delete mode 100644 Pods/Target Support Files/Alamofire/Alamofire-umbrella.h delete mode 100644 Pods/Target Support Files/Alamofire/Alamofire.modulemap delete mode 100644 Pods/Target Support Files/Alamofire/Alamofire.xcconfig delete mode 100644 Pods/Target Support Files/Alamofire/Info.plist delete mode 100644 Pods/Target Support Files/Astro/Astro-dummy.m delete mode 100644 Pods/Target Support Files/Astro/Astro-prefix.pch delete mode 100644 Pods/Target Support Files/Astro/Astro-umbrella.h delete mode 100644 Pods/Target Support Files/Astro/Astro.modulemap delete mode 100644 Pods/Target Support Files/Astro/Astro.xcconfig delete mode 100644 Pods/Target Support Files/Astro/Info.plist delete mode 100644 Pods/Target Support Files/Freddy/Freddy-dummy.m delete mode 100644 Pods/Target Support Files/Freddy/Freddy-prefix.pch delete mode 100644 Pods/Target Support Files/Freddy/Freddy-umbrella.h delete mode 100644 Pods/Target Support Files/Freddy/Freddy.modulemap delete mode 100644 Pods/Target Support Files/Freddy/Freddy.xcconfig delete mode 100644 Pods/Target Support Files/Freddy/Info.plist delete mode 100644 Pods/Target Support Files/Nimble/Info.plist delete mode 100644 Pods/Target Support Files/Nimble/Nimble-dummy.m delete mode 100644 Pods/Target Support Files/Nimble/Nimble-prefix.pch delete mode 100644 Pods/Target Support Files/Nimble/Nimble-umbrella.h delete mode 100644 Pods/Target Support Files/Nimble/Nimble.modulemap delete mode 100644 Pods/Target Support Files/Nimble/Nimble.xcconfig delete mode 100644 Pods/Target Support Files/Nocilla/Info.plist delete mode 100644 Pods/Target Support Files/Nocilla/Nocilla-dummy.m delete mode 100644 Pods/Target Support Files/Nocilla/Nocilla-prefix.pch delete mode 100644 Pods/Target Support Files/Nocilla/Nocilla-umbrella.h delete mode 100644 Pods/Target Support Files/Nocilla/Nocilla.modulemap delete mode 100644 Pods/Target Support Files/Nocilla/Nocilla.xcconfig delete mode 100644 Pods/Target Support Files/Pods-Astro/Info.plist delete mode 100644 Pods/Target Support Files/Pods-Astro/Pods-Astro-acknowledgements.markdown delete mode 100644 Pods/Target Support Files/Pods-Astro/Pods-Astro-acknowledgements.plist delete mode 100644 Pods/Target Support Files/Pods-Astro/Pods-Astro-dummy.m delete mode 100755 Pods/Target Support Files/Pods-Astro/Pods-Astro-frameworks.sh delete mode 100755 Pods/Target Support Files/Pods-Astro/Pods-Astro-resources.sh delete mode 100644 Pods/Target Support Files/Pods-Astro/Pods-Astro-umbrella.h delete mode 100644 Pods/Target Support Files/Pods-Astro/Pods-Astro.debug.xcconfig delete mode 100644 Pods/Target Support Files/Pods-Astro/Pods-Astro.modulemap delete mode 100644 Pods/Target Support Files/Pods-Astro/Pods-Astro.release.xcconfig delete mode 100644 Pods/Target Support Files/Pods-AstroTests/Info.plist delete mode 100644 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-acknowledgements.markdown delete mode 100644 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-acknowledgements.plist delete mode 100644 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-dummy.m delete mode 100755 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-frameworks.sh delete mode 100755 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-resources.sh delete mode 100644 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-umbrella.h delete mode 100644 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.debug.xcconfig delete mode 100644 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.modulemap delete mode 100644 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.release.xcconfig delete mode 100644 Pods/Target Support Files/Quick/Info.plist delete mode 100644 Pods/Target Support Files/Quick/Quick-dummy.m delete mode 100644 Pods/Target Support Files/Quick/Quick-prefix.pch delete mode 100644 Pods/Target Support Files/Quick/Quick-umbrella.h delete mode 100644 Pods/Target Support Files/Quick/Quick.modulemap delete mode 100644 Pods/Target Support Files/Quick/Quick.xcconfig delete mode 100644 Pods/Target Support Files/SwiftTask/Info.plist delete mode 100644 Pods/Target Support Files/SwiftTask/SwiftTask-dummy.m delete mode 100644 Pods/Target Support Files/SwiftTask/SwiftTask-prefix.pch delete mode 100644 Pods/Target Support Files/SwiftTask/SwiftTask-umbrella.h delete mode 100644 Pods/Target Support Files/SwiftTask/SwiftTask.modulemap delete mode 100644 Pods/Target Support Files/SwiftTask/SwiftTask.xcconfig diff --git a/.gitignore b/.gitignore index 45091a9..8e299da 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ DerivedData # Pods/ .idea +.DS_Store \ No newline at end of file diff --git a/Astro.podspec b/Astro.podspec index f4077dd..11a3ee2 100644 --- a/Astro.podspec +++ b/Astro.podspec @@ -40,8 +40,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI s.subspec 'Networking' do | net | net.source_files = 'Astro/Networking/**/*.swift' net.dependency 'Astro/Logging' - net.dependency 'Alamofire', '~> 3.3' - net.dependency 'Freddy', '~> 2.0' + net.dependency 'Alamofire', '~> 4.0' + net.dependency 'Freddy', '3.0' net.dependency 'SwiftTask', '5.0' end diff --git a/Astro.xcodeproj/project.pbxproj b/Astro.xcodeproj/project.pbxproj index dc1aa68..1b56abf 100644 --- a/Astro.xcodeproj/project.pbxproj +++ b/Astro.xcodeproj/project.pbxproj @@ -661,7 +661,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -683,7 +683,7 @@ PRODUCT_BUNDLE_IDENTIFIER = RNP.Astro; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; }; name = Release; }; @@ -696,7 +696,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)"; PRODUCT_BUNDLE_IDENTIFIER = RNP.AstroTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -709,7 +709,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)"; PRODUCT_BUNDLE_IDENTIFIER = RNP.AstroTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; }; name = Release; }; diff --git a/Astro/Logging/Log.swift b/Astro/Logging/Log.swift index c585cc3..68b7dce 100644 --- a/Astro/Logging/Log.swift +++ b/Astro/Logging/Log.swift @@ -21,7 +21,7 @@ public protocol Logger { - Parameter level: Importance level of the message to be logged - Parameter message: Message contents that will be logged */ - func log(level: Log.Level, message: String); + func log(_ level: Log.Level, message: String); } /** @@ -39,31 +39,31 @@ public struct Log { - Silent - allows you to shut off the logger completely with minimal performance impacts */ public enum Level: Int { - case Debug - case Info - case Warning - case Error - case Silent + case debug + case info + case warning + case error + case silent } /** A default logger implementation that logs to NSLog with the log message prefixed by its log Level */ public struct BasicLogger: Logger { - public func log(level: Level, message: String) { + public func log(_ level: Level, message: String) { var prefix = "" switch level { - case .Debug: + case .debug: prefix = "DEBUG" break - case .Info: + case .info: prefix = "INFO" break - case .Warning: + case .warning: prefix = "WARN" break - case .Error: + case .error: prefix = "ERROR" break default: @@ -76,7 +76,7 @@ public struct Log { /** Contains the current logging level that is configured */ - public static var level = Level.Error + public static var level = Level.error /** Contains the current logger that is configured @@ -86,36 +86,36 @@ public struct Log { /** Log a debug message */ - public static func debug(@autoclosure msg: () -> String) { - if level.rawValue <= Level.Debug.rawValue { - logger.log(.Debug, message: msg()) + public static func debug(_ msg: @autoclosure () -> String) { + if level.rawValue <= Level.debug.rawValue { + logger.log(.debug, message: msg()) } } /** Log an info message */ - public static func info(@autoclosure msg: () -> String) { - if level.rawValue <= Level.Info.rawValue { - logger.log(.Info, message: msg()) + public static func info(_ msg: @autoclosure () -> String) { + if level.rawValue <= Level.info.rawValue { + logger.log(.info, message: msg()) } } /** Log a warning message */ - public static func warn(@autoclosure msg: () -> String) { - if level.rawValue <= Level.Warning.rawValue { - logger.log(.Warning, message: msg()) + public static func warn(_ msg: @autoclosure () -> String) { + if level.rawValue <= Level.warning.rawValue { + logger.log(.warning, message: msg()) } } /** Log an error message */ - public static func error(@autoclosure msg: () -> String) { - if level.rawValue <= Level.Error.rawValue { - logger.log(.Error, message: msg()) + public static func error(_ msg: @autoclosure () -> String) { + if level.rawValue <= Level.error.rawValue { + logger.log(.error, message: msg()) } } } diff --git a/Astro/Networking/HTTPStatusCode.swift b/Astro/Networking/HTTPStatusCode.swift index 531d05a..e6f6b85 100644 --- a/Astro/Networking/HTTPStatusCode.swift +++ b/Astro/Networking/HTTPStatusCode.swift @@ -28,61 +28,61 @@ import Foundation */ @objc public enum HTTPStatusCode: Int, CustomStringConvertible, CustomDebugStringConvertible { // Informational - 1xx codes - case Code100Continue = 100 - case Code101SwitchingProtocols = 101 + case code100Continue = 100 + case code101SwitchingProtocols = 101 // Successful - 2xx codes - case Code200OK = 200 - case Code201Created = 201 - case Code202Accepted = 202 - case Code203NonAuthoritative = 203 - case Code204NoContent = 204 - case Code205ResetContent = 205 - case Code206PartialContent = 206 + case code200OK = 200 + case code201Created = 201 + case code202Accepted = 202 + case code203NonAuthoritative = 203 + case code204NoContent = 204 + case code205ResetContent = 205 + case code206PartialContent = 206 // Redirection - 3xx codes - case Code300MultipleChoices = 300 - case Code301MovedPermanently = 301 - case Code302Found = 302 - case Code303SeeOther = 303 - case Code304NotModified = 304 - case Code305UseProxy = 305 - case Code307TemporaryRedirect = 307 + case code300MultipleChoices = 300 + case code301MovedPermanently = 301 + case code302Found = 302 + case code303SeeOther = 303 + case code304NotModified = 304 + case code305UseProxy = 305 + case code307TemporaryRedirect = 307 // Client errors - 4xx codes - case Code400BadRequest = 400 - case Code401Unauthorized = 401 - case Code402PaymentRequired = 402 - case Code403Forbidden = 403 - case Code404NotFound = 404 - case Code405MethodNotAllowed = 405 - case Code406NotAcceptable = 406 - case Code407ProxyAuthenticationRequired = 407 - case Code408RequestTimeout = 408 - case Code409Conflict = 409 - case Code410Gone = 410 - case Code411LengthRequired = 411 - case Code412PreconditionFailed = 412 - case Code413RequestEntityTooLarge = 413 - case Code414RequestURITooLong = 414 - case Code415UnsupportedMediaType = 415 - case Code416RequestedRangeNotSatisfiable = 416 - case Code417ExpectationFailed = 417 - case Code429TooManyRequests = 429 + case code400BadRequest = 400 + case code401Unauthorized = 401 + case code402PaymentRequired = 402 + case code403Forbidden = 403 + case code404NotFound = 404 + case code405MethodNotAllowed = 405 + case code406NotAcceptable = 406 + case code407ProxyAuthenticationRequired = 407 + case code408RequestTimeout = 408 + case code409Conflict = 409 + case code410Gone = 410 + case code411LengthRequired = 411 + case code412PreconditionFailed = 412 + case code413RequestEntityTooLarge = 413 + case code414RequestURITooLong = 414 + case code415UnsupportedMediaType = 415 + case code416RequestedRangeNotSatisfiable = 416 + case code417ExpectationFailed = 417 + case code429TooManyRequests = 429 // Server errors - 5xx codes - case Code500InternalServerError = 500 - case Code501NotImplemented = 501 - case Code502BadGateway = 502 - case Code503ServiceUnavailable = 503 - case Code504GatewayTimeout = 504 - case Code505HTTPVersionNotSupported = 505 + case code500InternalServerError = 500 + case code501NotImplemented = 501 + case code502BadGateway = 502 + case code503ServiceUnavailable = 503 + case code504GatewayTimeout = 504 + case code505HTTPVersionNotSupported = 505 // MARK: CustomStringConvertible public var description: String { - return NSHTTPURLResponse.localizedStringForStatusCode(rawValue).capitalizedString + return HTTPURLResponse.localizedString(forStatusCode: rawValue).capitalized } // MARK: CustomDebugStringConvertible @@ -99,47 +99,47 @@ import Foundation */ public var string: String { switch self { - case .Code100Continue: return "Continue" - case .Code101SwitchingProtocols: return "Switching Protocols" - case .Code200OK: return "OK" - case .Code201Created: return "Created" - case .Code202Accepted: return "Accepted" - case .Code203NonAuthoritative: return "Non Authoritative" - case .Code204NoContent: return "No Content" - case .Code205ResetContent: return "Reset Content" - case .Code206PartialContent: return "Partial Content" - case .Code300MultipleChoices: return "Multiple Choices" - case .Code301MovedPermanently: return "Moved Permanently" - case .Code302Found: return "Found" - case .Code303SeeOther: return "See Other" - case .Code304NotModified: return "Not Modified" - case .Code305UseProxy: return "Use Proxy" - case .Code307TemporaryRedirect: return "Temporary Redirect" - case .Code400BadRequest: return "Bad Request" - case .Code401Unauthorized: return "Unauthorized" - case .Code402PaymentRequired: return "Payment Required" - case .Code403Forbidden: return "Forbidden" - case .Code404NotFound: return "Not Found" - case .Code405MethodNotAllowed: return "Method Not Allowed" - case .Code406NotAcceptable: return "Not Acceptable" - case .Code407ProxyAuthenticationRequired: return "Proxy Authentication Required" - case .Code408RequestTimeout: return "Request Timeout" - case .Code409Conflict: return "Conflict" - case .Code410Gone: return "Gone" - case .Code411LengthRequired: return "Length Required" - case .Code412PreconditionFailed: return "Precondition Failed" - case .Code413RequestEntityTooLarge: return "Request Entity Too Large" - case .Code414RequestURITooLong: return "Request URI Too Long" - case .Code415UnsupportedMediaType: return "Unsupported Media Type" - case .Code416RequestedRangeNotSatisfiable: return "Requested Range Not Satisfiable" - case .Code417ExpectationFailed: return "Expectation Failed" - case .Code429TooManyRequests: return "Too Many Requests" - case .Code500InternalServerError: return "Internal Server Error" - case .Code501NotImplemented: return "Not Implemented" - case .Code502BadGateway: return "Bad Gateway" - case .Code503ServiceUnavailable: return "Service Unavailable" - case .Code504GatewayTimeout: return "Gateway Timeout" - case .Code505HTTPVersionNotSupported: return "HTTP Version Not Supported" + case .code100Continue: return "Continue" + case .code101SwitchingProtocols: return "Switching Protocols" + case .code200OK: return "OK" + case .code201Created: return "Created" + case .code202Accepted: return "Accepted" + case .code203NonAuthoritative: return "Non Authoritative" + case .code204NoContent: return "No Content" + case .code205ResetContent: return "Reset Content" + case .code206PartialContent: return "Partial Content" + case .code300MultipleChoices: return "Multiple Choices" + case .code301MovedPermanently: return "Moved Permanently" + case .code302Found: return "Found" + case .code303SeeOther: return "See Other" + case .code304NotModified: return "Not Modified" + case .code305UseProxy: return "Use Proxy" + case .code307TemporaryRedirect: return "Temporary Redirect" + case .code400BadRequest: return "Bad Request" + case .code401Unauthorized: return "Unauthorized" + case .code402PaymentRequired: return "Payment Required" + case .code403Forbidden: return "Forbidden" + case .code404NotFound: return "Not Found" + case .code405MethodNotAllowed: return "Method Not Allowed" + case .code406NotAcceptable: return "Not Acceptable" + case .code407ProxyAuthenticationRequired: return "Proxy Authentication Required" + case .code408RequestTimeout: return "Request Timeout" + case .code409Conflict: return "Conflict" + case .code410Gone: return "Gone" + case .code411LengthRequired: return "Length Required" + case .code412PreconditionFailed: return "Precondition Failed" + case .code413RequestEntityTooLarge: return "Request Entity Too Large" + case .code414RequestURITooLong: return "Request URI Too Long" + case .code415UnsupportedMediaType: return "Unsupported Media Type" + case .code416RequestedRangeNotSatisfiable: return "Requested Range Not Satisfiable" + case .code417ExpectationFailed: return "Expectation Failed" + case .code429TooManyRequests: return "Too Many Requests" + case .code500InternalServerError: return "Internal Server Error" + case .code501NotImplemented: return "Not Implemented" + case .code502BadGateway: return "Bad Gateway" + case .code503ServiceUnavailable: return "Service Unavailable" + case .code504GatewayTimeout: return "Gateway Timeout" + case .code505HTTPVersionNotSupported: return "HTTP Version Not Supported" } } @@ -210,33 +210,33 @@ extension HTTPStatusCode { switch self { // Client errors - 4xx codes - case Code400BadRequest: return "A bad request was made to the server." - case Code401Unauthorized: return "An unauthorized request was made to the server." - case Code402PaymentRequired: return "Payment is required to access this resource." - case Code403Forbidden: return "Access to that resource is forbidden." - case Code404NotFound: return "That resource wasn't found." - case Code405MethodNotAllowed: return "That kind of request isn't allowed." - case Code406NotAcceptable: return "That request isn't acceptable." - case Code407ProxyAuthenticationRequired: return "Proxy authentication is required." - case Code408RequestTimeout: return "The request timed out." - case Code409Conflict: return "There was a conflict with that resource." - case Code410Gone: return "That resource is gone." - case Code411LengthRequired: return "The length of the resource is required." - case Code412PreconditionFailed: return "A precondition failed." - case Code413RequestEntityTooLarge: return "The request entity was too large." - case Code414RequestURITooLong: return "The request URI was too long." - case Code415UnsupportedMediaType: return "The server doesn't support the type of media in that request." - case Code416RequestedRangeNotSatisfiable: return "The requested range isn't able to be satisfied by the server." - case Code417ExpectationFailed: return "An expectation failed." - case Code429TooManyRequests: return "The user has sent too many requests in a given amount of time." + case .code400BadRequest: return "A bad request was made to the server." + case .code401Unauthorized: return "An unauthorized request was made to the server." + case .code402PaymentRequired: return "Payment is required to access this resource." + case .code403Forbidden: return "Access to that resource is forbidden." + case .code404NotFound: return "That resource wasn't found." + case .code405MethodNotAllowed: return "That kind of request isn't allowed." + case .code406NotAcceptable: return "That request isn't acceptable." + case .code407ProxyAuthenticationRequired: return "Proxy authentication is required." + case .code408RequestTimeout: return "The request timed out." + case .code409Conflict: return "There was a conflict with that resource." + case .code410Gone: return "That resource is gone." + case .code411LengthRequired: return "The length of the resource is required." + case .code412PreconditionFailed: return "A precondition failed." + case .code413RequestEntityTooLarge: return "The request entity was too large." + case .code414RequestURITooLong: return "The request URI was too long." + case .code415UnsupportedMediaType: return "The server doesn't support the type of media in that request." + case .code416RequestedRangeNotSatisfiable: return "The requested range isn't able to be satisfied by the server." + case .code417ExpectationFailed: return "An expectation failed." + case .code429TooManyRequests: return "The user has sent too many requests in a given amount of time." // Server errors - 5xx codes - case Code500InternalServerError: return "An error occurred in the server." - case Code501NotImplemented: return "That feature of the server isn't implemented." - case Code502BadGateway: return "The gateway is bad." - case Code503ServiceUnavailable: return "The server is unavailable." - case Code504GatewayTimeout: return "The request timed out." - case Code505HTTPVersionNotSupported: return "That HTTP version is unsupported by the server." + case .code500InternalServerError: return "An error occurred in the server." + case .code501NotImplemented: return "That feature of the server isn't implemented." + case .code502BadGateway: return "The gateway is bad." + case .code503ServiceUnavailable: return "The server is unavailable." + case .code504GatewayTimeout: return "The request timed out." + case .code505HTTPVersionNotSupported: return "That HTTP version is unsupported by the server." default: return "" } @@ -250,22 +250,22 @@ extension HTTPStatusCode { switch self { // Client errors - 4xx codes - case .Code400BadRequest, .Code405MethodNotAllowed, .Code406NotAcceptable, .Code407ProxyAuthenticationRequired, .Code408RequestTimeout, .Code409Conflict, .Code411LengthRequired, .Code412PreconditionFailed, .Code413RequestEntityTooLarge, .Code414RequestURITooLong, .Code415UnsupportedMediaType, .Code416RequestedRangeNotSatisfiable, .Code417ExpectationFailed: + case .code400BadRequest, .code405MethodNotAllowed, .code406NotAcceptable, .code407ProxyAuthenticationRequired, .code408RequestTimeout, .code409Conflict, .code411LengthRequired, .code412PreconditionFailed, .code413RequestEntityTooLarge, .code414RequestURITooLong, .code415UnsupportedMediaType, .code416RequestedRangeNotSatisfiable, .code417ExpectationFailed: return "This is an application error, try signing out and back in again. If this doesn't resolve the issue, please contact support." - case .Code401Unauthorized: return "Try signing out and back in again. If the issue persists, please contact support." - case .Code402PaymentRequired: return "Please make a payment for this resource and try again." - case .Code403Forbidden: return "If the issue persists, please contact support." - case .Code404NotFound: return "If you think this is incorrect, please contact support." - case .Code410Gone: return "If you think this is incorrect, please contact support." - case .Code429TooManyRequests: return "The system has received too many requests and has stopped responding, you can try again shortly but if the issue persists please contact support." + case .code401Unauthorized: return "Try signing out and back in again. If the issue persists, please contact support." + case .code402PaymentRequired: return "Please make a payment for this resource and try again." + case .code403Forbidden: return "If the issue persists, please contact support." + case .code404NotFound: return "If you think this is incorrect, please contact support." + case .code410Gone: return "If you think this is incorrect, please contact support." + case .code429TooManyRequests: return "The system has received too many requests and has stopped responding, you can try again shortly but if the issue persists please contact support." // Server errors - 5xx codes - case .Code500InternalServerError: return "You can try the same action again, but if the issue persists please contact support." - case .Code501NotImplemented: return "" - case .Code502BadGateway: return "Please contact support if the issue persists." - case .Code503ServiceUnavailable: return "You can try again shortly, but if the issue persists please contact support." - case .Code504GatewayTimeout: return "You can try again shortly, but if the issue persists please contact support." - case .Code505HTTPVersionNotSupported: return "You can try the same action again, but if the issue persists please contact support." + case .code500InternalServerError: return "You can try the same action again, but if the issue persists please contact support." + case .code501NotImplemented: return "" + case .code502BadGateway: return "Please contact support if the issue persists." + case .code503ServiceUnavailable: return "You can try again shortly, but if the issue persists please contact support." + case .code504GatewayTimeout: return "You can try again shortly, but if the issue persists please contact support." + case .code505HTTPVersionNotSupported: return "You can try the same action again, but if the issue persists please contact support." default: return "" } diff --git a/Astro/Networking/NetworkService.swift b/Astro/Networking/NetworkService.swift index 19e5133..22107a9 100644 --- a/Astro/Networking/NetworkService.swift +++ b/Astro/Networking/NetworkService.swift @@ -17,7 +17,7 @@ import Freddy /// Error Type. public struct NetworkError { public let response: Response? - public let error: ErrorType + public let error: Error public var statusCode: HTTPStatusCode? { guard let response = response?.response else { return nil } @@ -29,7 +29,7 @@ public struct NetworkError { return try? JSON(data: data) } - public init(response: Response? = nil, error: ErrorType) { + public init(response: Response? = nil, error: Error) { self.response = response self.error = error } @@ -58,7 +58,7 @@ public protocol NetworkServiceType { - parameter URLRequest: the request - returns: A task */ - func request(URLRequest: URLRequestConvertible) -> Task, NetworkError> + func request(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> /** Performs the specified request for a single object of type T. The response body is @@ -68,7 +68,7 @@ public protocol NetworkServiceType { - parameter URLRequest: the request - returns: A task for type T */ - func request(URLRequest: URLRequestConvertible) -> Task, NetworkError> + func request(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> /** Performs the specified request for a single object of type T. The response body is @@ -79,7 +79,7 @@ public protocol NetworkServiceType { - parameter URLRequest: the request - returns: A task for type T? */ - func request(URLRequest: URLRequestConvertible) -> Task, NetworkError> + func request(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> /** Performs the specified request for an array of type T. The response body is expected @@ -89,7 +89,7 @@ public protocol NetworkServiceType { - parameter URLRequest: the request - returns: A task for type [T] */ - func request(URLRequest: URLRequestConvertible) -> Task, NetworkError> + func request(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> /** Performs the specified request for an array of type T. The response body is expected @@ -100,7 +100,7 @@ public protocol NetworkServiceType { - parameter URLRequest: the request - returns: A task for type [T] */ - func request(URLRequest: URLRequestConvertible) -> Task, NetworkError> + func request(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> /** Performs the specified request for a JSON dictionary. @@ -108,7 +108,7 @@ public protocol NetworkServiceType { - parameter URLRequest: the request - returns: A task for a JSON dictionary */ - func requestJSONDictionary(URLRequest: URLRequestConvertible) -> Task, NetworkError> + func requestJSONDictionary(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> /** Performs the specified request for a JSON array. @@ -116,7 +116,7 @@ public protocol NetworkServiceType { - parameter URLRequest: the request - returns: A task for a JSON array */ - func requestJSONArray(URLRequest: URLRequestConvertible) -> Task, NetworkError> + func requestJSONArray(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> /** Performs the specified request for a JSON array. @@ -124,7 +124,7 @@ public protocol NetworkServiceType { - parameter URLRequest: the request - returns: A task for a JSON array */ - func requestJSONArray(URLRequest: URLRequestConvertible) -> Task, NetworkError> + func requestJSONArray(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> /** Performs the specified request for some JSON (which may be either an array or a dictionary). @@ -132,7 +132,7 @@ public protocol NetworkServiceType { - parameter URLRequest: the request - returns: A task for a JSON object which is either an array or dictionary */ - func requestJSON(URLRequest: URLRequestConvertible) -> Task, NetworkError> + func requestJSON(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> /** Performs the specified request for some JSON (which may be either an array or a dictionary). @@ -140,7 +140,7 @@ public protocol NetworkServiceType { - parameter URLRequest: the request - returns: A task for a JSON object which is either an array or dictionary */ - func requestJSON(URLRequest: URLRequestConvertible) -> Task, NetworkError> + func requestJSON(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> /** Performs the specified request for some data. @@ -148,52 +148,52 @@ public protocol NetworkServiceType { - parameter URLRequest: the request - returns: A task for NSData */ - func requestData(URLRequest: URLRequestConvertible) -> Task, NetworkError> + func requestData(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> } /// Convenience methods without underlying NSHTTPURLResponse public extension NetworkServiceType { - func request(URLRequest: URLRequestConvertible) -> Task { + func request(_ URLRequest: URLRequestConvertible) -> Task { return request(URLRequest).success { $0.value } } - func request(URLRequest: URLRequestConvertible) -> Task { + func request(_ URLRequest: URLRequestConvertible) -> Task { return request(URLRequest).success { $0.value } } - func request(URLRequest: URLRequestConvertible) -> Task { + func request(_ URLRequest: URLRequestConvertible) -> Task { return request(URLRequest).success { $0.value } } - func request(URLRequest: URLRequestConvertible) -> Task { + func request(_ URLRequest: URLRequestConvertible) -> Task { return request(URLRequest).success { $0.value } } - func request(URLRequest: URLRequestConvertible) -> Task { + func request(_ URLRequest: URLRequestConvertible) -> Task { return request(URLRequest).success { $0.value } } - func requestJSONDictionary(URLRequest: URLRequestConvertible) -> Task { + func requestJSONDictionary(_ URLRequest: URLRequestConvertible) -> Task { return requestJSONDictionary(URLRequest).success { $0.value } } - func requestJSONArray(URLRequest: URLRequestConvertible) -> Task { + func requestJSONArray(_ URLRequest: URLRequestConvertible) -> Task { return requestJSONArray(URLRequest).success { $0.value } } - func requestJSONArray(URLRequest: URLRequestConvertible) -> Task { + func requestJSONArray(_ URLRequest: URLRequestConvertible) -> Task { return requestJSONArray(URLRequest).success { $0.value } } - func requestJSON(URLRequest: URLRequestConvertible) -> Task { + func requestJSON(_ URLRequest: URLRequestConvertible) -> Task { return requestJSON(URLRequest).success { $0.value } } - func requestJSON(URLRequest: URLRequestConvertible) -> Task { + func requestJSON(_ URLRequest: URLRequestConvertible) -> Task { return requestJSON(URLRequest).success { $0.value } } - func requestData(URLRequest: URLRequestConvertible) -> Task { + func requestData(_ URLRequest: URLRequestConvertible) -> Task { return self.requestData(URLRequest).success { return $0.value } } } @@ -205,10 +205,10 @@ public extension NetworkServiceType { custom behaviour based on something like statusCode. Designed to implement NetworkServiceType so that it can be easily mocked. */ -public class NetworkService: NetworkServiceType { +open class NetworkService: NetworkServiceType { - public struct AssertionError: ErrorType {} - private let requestManager: Alamofire.Manager + public struct AssertionError: Error {} + fileprivate let requestManager: Alamofire.Manager public convenience init() { let requestManager: Alamofire.Manager = { @@ -224,11 +224,11 @@ public class NetworkService: NetworkServiceType { self.requestManager = requestManager } - public func request(URLRequest: URLRequestConvertible) -> Task, NetworkError> { + open func request(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> { return requestData(URLRequest).success { value in return ResponseValue(response: value.response, value: ()) } } - public func request(URLRequest: URLRequestConvertible) -> Task, NetworkError> { + open func request(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> { return requestJSON(URLRequest).success { (value: ResponseValue) -> Task, NetworkError> in let json = value.value do { @@ -240,7 +240,7 @@ public class NetworkService: NetworkServiceType { } } - public func request(URLRequest: URLRequestConvertible) -> Task, NetworkError> { + open func request(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> { return requestJSON(URLRequest).success { (value: ResponseValue) -> Task, NetworkError> in guard let json = value.value else { return Task(value: ResponseValue(response: value.response, value: nil)) @@ -254,7 +254,7 @@ public class NetworkService: NetworkServiceType { } } - public func request(URLRequest: URLRequestConvertible) -> Task, NetworkError> { + open func request(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> { return requestJSONArray(URLRequest).success { (value: ResponseValue<[JSON]>) -> Task, NetworkError> in let json = value.value do { @@ -266,7 +266,7 @@ public class NetworkService: NetworkServiceType { } } - public func request(URLRequest: URLRequestConvertible) -> Task, NetworkError> { + open func request(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> { return requestJSONArray(URLRequest).success { (value: ResponseValue<[JSON]?>) -> Task, NetworkError> in guard let json = value.value else { return Task(value: ResponseValue(response: value.response, value: nil)) @@ -280,7 +280,7 @@ public class NetworkService: NetworkServiceType { } } - public func requestJSONDictionary(URLRequest: URLRequestConvertible) -> Task, NetworkError> { + open func requestJSONDictionary(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> { return requestJSON(URLRequest).success { (value: ResponseValue) -> Task, NetworkError> in let json = value.value guard case let JSON.Dictionary(dictionary) = json else { @@ -291,7 +291,7 @@ public class NetworkService: NetworkServiceType { } } - public func requestJSONArray(URLRequest: URLRequestConvertible) -> Task, NetworkError> { + open func requestJSONArray(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> { return requestJSON(URLRequest).success { (value: ResponseValue) -> Task, NetworkError> in let json = value.value guard case let JSON.Array(array) = json else { @@ -302,7 +302,7 @@ public class NetworkService: NetworkServiceType { } } - public func requestJSONArray(URLRequest: URLRequestConvertible) -> Task, NetworkError> { + open func requestJSONArray(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> { return requestJSON(URLRequest).success { (value: ResponseValue) -> Task, NetworkError> in guard let json = value.value else { return Task(value: ResponseValue(response: value.response, value: nil)) @@ -315,7 +315,7 @@ public class NetworkService: NetworkServiceType { } } - public func requestJSON(URLRequest: URLRequestConvertible) -> Task, NetworkError> { + open func requestJSON(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> { return requestData(URLRequest).success { value -> Task, NetworkError> in do { let json = try JSON(data: value.value) @@ -326,7 +326,7 @@ public class NetworkService: NetworkServiceType { } } - public func requestJSON(URLRequest: URLRequestConvertible) -> Task, NetworkError> { + open func requestJSON(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> { return requestData(URLRequest).success { value -> Task, NetworkError> in if value.value.length == 0 { return Task(value: ResponseValue(response: value.response, value: nil)) @@ -340,7 +340,7 @@ public class NetworkService: NetworkServiceType { } } - public func requestData(URLRequest: URLRequestConvertible) -> Task, NetworkError> { + open func requestData(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> { return Task { [weak self] progress, fulfill, reject, configure in NetworkService.postNotification(NetworkService.Notifications.DidRequest, request: URLRequest) @@ -352,7 +352,7 @@ public class NetworkService: NetworkServiceType { .responseData { response in NetworkService.postNotification(NetworkService.Notifications.DidReceive, request: URLRequest, response: response) - guard let data = response.result.value where response.result.isSuccess else { + guard let data = response.result.value , response.result.isSuccess else { // We should always have an error in the non success case but use AssertionError to avoid a bang (!) let error: ErrorType = response.result.error ?? AssertionError() reject(NetworkError(response: response, error: error)) @@ -400,23 +400,23 @@ public extension NetworkService { /** This is a box/wrapper for the request and response because we can't directly add the response to the UserInfo dict (since it's not an NSObject) */ - public class NotificationInfo: NSObject { + open class NotificationInfo: NSObject { /** The request that was performed by the NetworkService */ - public let request: NSMutableURLRequest + open let request: NSMutableURLRequest /** The response that is received in response to `request`. This value will only have a value for the `Notifications.DidReceive` notification. */ - public let response: Response? + open let response: Response? /** Creates an instance with the specified request and optional response. - parameter request: the request being performed by the NetworkService - parameter response: an option response received by the NetworkService */ - private init(request: URLRequestConvertible, response: Response? = nil) { + fileprivate init(request: URLRequestConvertible, response: Response? = nil) { self.request = request.URLRequest self.response = response } @@ -428,10 +428,10 @@ public extension NetworkService { - parameter request: The request made by the network service - parameter response: The response received by the network service. This will only have a value for Notifications.DidReceive */ - private static func postNotification(notificationName: String, request: URLRequestConvertible, response: Response? = nil) { + fileprivate static func postNotification(_ notificationName: String, request: URLRequestConvertible, response: Response? = nil) { let info = NotificationInfo(request: request, response: response) - NSNotificationCenter.defaultCenter().postNotificationName(notificationName, object: self, userInfo: [NetworkService.NotificationInfoKey: info]) + NotificationCenter.defaultCenter().postNotificationName(notificationName, object: self, userInfo: [NetworkService.NotificationInfoKey: info]) } } diff --git a/Astro/Networking/NetworkServiceLogger.swift b/Astro/Networking/NetworkServiceLogger.swift index 5f186c2..c785a6a 100644 --- a/Astro/Networking/NetworkServiceLogger.swift +++ b/Astro/Networking/NetworkServiceLogger.swift @@ -15,7 +15,7 @@ import Alamofire /** A simple logger that listens for NetworkService request/response events and logs the related information in a nicely formatted message for debugging. */ -public class NetworkServiceLogger: NSObject { +open class NetworkServiceLogger: NSObject { /** Use this instance for the simplest use case. For example, starting the logger can be as simple as: @@ -23,17 +23,17 @@ public class NetworkServiceLogger: NSObject { NetworkServiceLogger.sharedInstance.start() ``` */ - public static let sharedInstance = NetworkServiceLogger() + open static let sharedInstance = NetworkServiceLogger() /** Set this option to include or exclude the request and response headers in the formatted log message. Defaults to false (forced to true when logging response errors). */ - public var includeHeaders = false + open var includeHeaders = false /** Set this option to include or exclude the request and response body in the formatted log message. Defaults to true (forced to true when logging response errors). */ - public var includeBody = true + open var includeBody = true deinit { stop() @@ -42,22 +42,22 @@ public class NetworkServiceLogger: NSObject { /** Starts observing and logging network service notifications. */ - public func start() { - NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(didRequest(_:)), name: NetworkService.Notifications.DidRequest, object: nil) - NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(didReceive(_:)), name: NetworkService.Notifications.DidReceive, object: nil) + open func start() { + NotificationCenter.default.addObserver(self, selector: #selector(didRequest(_:)), name: NSNotification.Name(rawValue: NetworkService.Notifications.DidRequest), object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(didReceive(_:)), name: NSNotification.Name(rawValue: NetworkService.Notifications.DidReceive), object: nil) } /** Stops observing and logging network service notifications. */ - public func stop() { - NSNotificationCenter.defaultCenter().removeObserver(self) + open func stop() { + NotificationCenter.default.removeObserver(self) } /** Internal method for handling request notifications */ - func didRequest(notification: NSNotification) { + func didRequest(_ notification: Notification) { guard let request = notification.info?.request else { return } Log.info(request.debugDescription(headers: includeHeaders, body: includeBody)) @@ -66,7 +66,7 @@ public class NetworkServiceLogger: NSObject { /** Internal method for handling response notifications */ - func didReceive(notification: NSNotification) { + func didReceive(_ notification: Notification) { guard let response = notification.info?.response else { return } switch response.result { @@ -78,7 +78,7 @@ public class NetworkServiceLogger: NSObject { } } -private extension NSNotification { +private extension Notification { /** Private convenience extension to make extracting the network info from the notification simple. */ @@ -95,22 +95,22 @@ private extension NSMutableURLRequest { - returns: A formatted string representing the request */ func debugDescription(headers includeHeaders: Bool = false, body includeBody: Bool = false) -> String { - let method = HTTPMethod - let url = URL?.absoluteString ?? "" + let method = httpMethod + let url = url?.absoluteString ?? "" var result = "\(method) \(url)" if includeHeaders { let headers = allHTTPHeaderFields?.map { "\($0): \($1)" } if let headers = headers { - result.appendContentsOf(":\n\(headers)\n") + result.append(":\n\(headers)\n") } } if includeBody { - if let bodyData = HTTPBody, - body = String(data: bodyData, encoding: NSUTF8StringEncoding) { - result.appendContentsOf("\n") - result.appendContentsOf(body) + if let bodyData = httpBody, + let body = String(data: bodyData, encoding: String.Encoding.utf8) { + result.append("\n") + result.append(body) } } return result @@ -140,7 +140,7 @@ private extension Response { if includeBody || statusCode?.isError == true { if let bodyData = self.data, - body = String(data: bodyData, encoding: NSUTF8StringEncoding) { + let body = String(data: bodyData, encoding: NSUTF8StringEncoding) { result.appendContentsOf("\n") result.appendContentsOf(body) } diff --git a/Astro/Networking/Route.swift b/Astro/Networking/Route.swift index 25fd1e3..4ce16a2 100644 --- a/Astro/Networking/Route.swift +++ b/Astro/Networking/Route.swift @@ -60,10 +60,10 @@ extension Route: CustomStringConvertible { } public enum RequestParameters { - case JSON(parameters: Freddy.JSON) - case Dictionary(parameters: [String: AnyObject], parameterEncoding: Alamofire.ParameterEncoding) + case json(parameters: Freddy.JSON) + case dictionary(parameters: [String: AnyObject], parameterEncoding: Alamofire.ParameterEncoding) - public func encode(URLRequest: URLRequestConvertible) -> (NSMutableURLRequest, NSError?) { + public func encode(_ URLRequest: URLRequestConvertible) -> (NSMutableURLRequest, NSError?) { switch self { case .JSON(let parameters): let mutableURLRequest = URLRequest.URLRequest diff --git a/Astro/Security/KeychainAccess.swift b/Astro/Security/KeychainAccess.swift index 4bfef93..99a99db 100644 --- a/Astro/Security/KeychainAccess.swift +++ b/Astro/Security/KeychainAccess.swift @@ -14,10 +14,10 @@ import Security let KeychainAccessServiceBundleID: String = { if NSClassFromString("XCTestCase") != nil { - Log.level = Log.Level.Debug + Log.level = Log.Level.debug return "com.robotsandpencils.TestTarget" } else { - return NSBundle.mainBundle().bundleIdentifier ?? "" + return Bundle.main.bundleIdentifier ?? "" } }() @@ -26,7 +26,7 @@ let KeychainAccessErrorDomain = "\(KeychainAccessServiceBundleID).error" /** KeychainAccess provides the app access to a device's Keychain store. Usage is fairly straightforward, as part of an account, you can place strings (or data) for a key into the Keychain and then retrieve those values later. This makes it a good way to securely store a specific user's password or tokens for reuse in the app. */ -public class KeychainAccess { +open class KeychainAccess { let keychainAccessAccount: String? @@ -45,11 +45,11 @@ public class KeychainAccess { - parameter key: the key to find the string in the keychain - returns: the value stored for that key as a string. nil if there is no value or the value is not a string */ - public func getString(key: String) -> String? { + open func getString(_ key: String) -> String? { guard let data = self.get(key) else { return nil } - return NSString(data: data, encoding: NSUTF8StringEncoding) as? String + return NSString(data: data, encoding: String.Encoding.utf8.rawValue) as? String } /** @@ -58,14 +58,14 @@ public class KeychainAccess { - parameter key: the key to find the data in the keychain - returns: the value stored for that key as NSData. nil if there is no value or the value is not NSData */ - public func get(key: String) -> NSData? { + open func get(_ key: String) -> Data? { let query = self.query(key, get: true) var result: AnyObject? - let status = withUnsafeMutablePointer(&result) { SecItemCopyMatching(query, UnsafeMutablePointer($0)) } + let status = withUnsafeMutablePointer(to: &result) { SecItemCopyMatching(query, UnsafeMutablePointer($0)) } if status == errSecSuccess { - guard let data = result as? NSData else { + guard let data = result as? Data else { Log.debug("No data fetched for the key from keychain with status=\(status). Attempted to get value for key [\(key)]") return nil } @@ -83,8 +83,8 @@ public class KeychainAccess { - parameter value: the string to store in the keychain (if nil then no data will be stored for the key) - returns: true if the store was successful, false if there was an error */ - public func putString(key: String, value: String?) -> Bool { - return self.put(key, data: value?.dataUsingEncoding(NSUTF8StringEncoding)) + open func putString(_ key: String, value: String?) -> Bool { + return self.put(key, data: value?.data(using: String.Encoding.utf8)) } /** @@ -94,17 +94,17 @@ public class KeychainAccess { - parameter value: the data to store in the keychain (if nil then no data will be stored for the key) - returns: true if the store was successful, false if there was an error */ - public func put(key: String, data: NSData?) -> Bool { - let query = self.query(key, value: data) + open func put(_ key: String, data: Data?) -> Bool { + let query = self.query(key, value: data as AnyObject?) var result: AnyObject? - var status = withUnsafeMutablePointer(&result) { SecItemCopyMatching(query, UnsafeMutablePointer($0)) } + var status = withUnsafeMutablePointer(to: &result) { SecItemCopyMatching(query, UnsafeMutablePointer($0)) } if status == errSecSuccess { // Key previously existed if let data = data { // Updating the data to a new value - let attributesToUpdate: [String: AnyObject] = [kSecValueData as String : data] - status = SecItemUpdate(query, attributesToUpdate as CFDictionaryRef) + let attributesToUpdate: [String: AnyObject] = [kSecValueData as String : data as AnyObject] + status = SecItemUpdate(query, attributesToUpdate as CFDictionary) if status == errSecSuccess { return true } @@ -142,7 +142,7 @@ public class KeychainAccess { - parameter key: the key to delete the data for in the keychain - returns: true if the delete was successful, false if there was an error */ - public func delete(key: String) -> Bool { + open func delete(_ key: String) -> Bool { let query = self.query(key) let status = SecItemDelete(query) @@ -159,11 +159,11 @@ public class KeychainAccess { - returns: true if the delete was successful, false if there was an error */ - public func deleteAllKeysAndDataForApp() -> Bool { + open func deleteAllKeysAndDataForApp() -> Bool { var query: [String: AnyObject] = [:] query[kSecClass as String] = kSecClassGenericPassword - let status = SecItemDelete(query) + let status = SecItemDelete(query as CFDictionary) if status == errSecSuccess || status == errSecItemNotFound { return true } else { @@ -172,7 +172,7 @@ public class KeychainAccess { } } - public subscript(key: String) -> String? { + open subscript(key: String) -> String? { get { return self.getString(key) } @@ -182,7 +182,7 @@ public class KeychainAccess { } } - public subscript(data key: String) -> NSData? { + open subscript(data key: String) -> Data? { get { return self.get(key) } @@ -201,10 +201,10 @@ public class KeychainAccess { - parameter get: the query is for retrieving data and should have the parameters to do that - returns: a dictionary for use as the query */ - private func query(key: String, value: AnyObject? = nil, get: Bool = false) -> CFDictionaryRef { + fileprivate func query(_ key: String, value: AnyObject? = nil, get: Bool = false) -> CFDictionary { var query: [String: AnyObject] = [:] - query[kSecAttrService as String] = key - query[kSecAttrAccount as String] = self.keychainAccessAccount + query[kSecAttrService as String] = key as AnyObject? + query[kSecAttrAccount as String] = self.keychainAccessAccount as AnyObject? query[kSecAttrAccessible as String] = kSecAttrAccessibleWhenUnlocked query[kSecClass as String] = kSecClassGenericPassword @@ -217,7 +217,7 @@ public class KeychainAccess { query[kSecMatchLimit as String] = kSecMatchLimitOne } - return query as CFDictionaryRef + return query as CFDictionary } } diff --git a/Astro/UI/LayoutLabel.swift b/Astro/UI/LayoutLabel.swift index b34f85f..8a2df49 100644 --- a/Astro/UI/LayoutLabel.swift +++ b/Astro/UI/LayoutLabel.swift @@ -18,9 +18,9 @@ import UIKit Based on http://stackoverflow.com/questions/18118021/how-to-resize-superview-to-fit-all-subviews-with-autolayout */ -public class LayoutLabel: UILabel { +open class LayoutLabel: UILabel { - override public func layoutSubviews() { + override open func layoutSubviews() { super.layoutSubviews() if numberOfLines == 0 && preferredMaxLayoutWidth != frame.size.width { @@ -29,8 +29,8 @@ public class LayoutLabel: UILabel { } } - override public func intrinsicContentSize() -> CGSize { - var contentSize = super.intrinsicContentSize() + override open var intrinsicContentSize : CGSize { + var contentSize = super.intrinsicContentSize guard let text = text else { return contentSize diff --git a/Astro/UI/NibLoadableView.swift b/Astro/UI/NibLoadableView.swift index 691d26d..2d7a4dd 100644 --- a/Astro/UI/NibLoadableView.swift +++ b/Astro/UI/NibLoadableView.swift @@ -30,6 +30,6 @@ public protocol NibLoadableView: class { */ public extension NibLoadableView where Self: UIView { static var nibName: String { - return String(Self) + return String(describing: Self) } } diff --git a/Astro/UI/ReusableView.swift b/Astro/UI/ReusableView.swift index 08c6b5d..37636cc 100644 --- a/Astro/UI/ReusableView.swift +++ b/Astro/UI/ReusableView.swift @@ -28,6 +28,6 @@ public protocol ReusableView: class { */ public extension ReusableView where Self: UIView { static var defaultReuseIdentifier: String { - return String(Self) + return String(describing: Self) } } diff --git a/Astro/UI/UICollectionView+AstroGadgets.swift b/Astro/UI/UICollectionView+AstroGadgets.swift index b01618b..71b6814 100644 --- a/Astro/UI/UICollectionView+AstroGadgets.swift +++ b/Astro/UI/UICollectionView+AstroGadgets.swift @@ -20,8 +20,8 @@ public extension UICollectionView { - parameter cellType: The cell subclass type that conforms to the ReusableView protocol */ - public func register(cellType: T.Type) { - registerClass(cellType.self, forCellWithReuseIdentifier: cellType.defaultReuseIdentifier) + public func register(_ cellType: T.Type) where T: ReusableView { + self.register(cellType.self, forCellWithReuseIdentifier: cellType.defaultReuseIdentifier) } /** @@ -30,10 +30,10 @@ public extension UICollectionView { - parameter cellType: The cell subclass type that conforms to both ReusableView and NibLoadableView protocols */ - public func register(cellType: T.Type) { - let bundle = NSBundle(forClass: cellType.self) + public func register(_ cellType: T.Type) where T: ReusableView, T: NibLoadableView { + let bundle = Bundle(for: cellType.self) let nib = UINib(nibName: cellType.nibName, bundle: bundle) - registerNib(nib, forCellWithReuseIdentifier: cellType.defaultReuseIdentifier) + self.register(nib, forCellWithReuseIdentifier: cellType.defaultReuseIdentifier) } /** @@ -43,8 +43,8 @@ public extension UICollectionView { - parameter indexPath: The index path of the cell to dequeue */ - public func dequeueReusableCell(forIndexPath indexPath: NSIndexPath) -> T { - guard let cell = dequeueReusableCellWithReuseIdentifier(T.defaultReuseIdentifier, forIndexPath: indexPath) as? T else { + public func dequeueReusableCell(forIndexPath indexPath: IndexPath) -> T where T: ReusableView { + guard let cell = self.dequeueReusableCell(withReuseIdentifier: T.defaultReuseIdentifier, for: indexPath) as? T else { fatalError("Could not dequeue collection view cell with identifier: \(T.defaultReuseIdentifier)") } return cell diff --git a/Astro/UI/UIColor+AstroGadgets.swift b/Astro/UI/UIColor+AstroGadgets.swift index 9967971..723b380 100644 --- a/Astro/UI/UIColor+AstroGadgets.swift +++ b/Astro/UI/UIColor+AstroGadgets.swift @@ -29,8 +29,8 @@ extension UIColor { var parsedBlue: UInt32 = 255 var parsedAlpha: UInt32 = 255 - let hexCharacterSet = NSCharacterSet(charactersInString: "0123456789abcdefABCDEF") - let hexOnlyString = hexString.componentsSeparatedByCharactersInSet(hexCharacterSet.invertedSet).joinWithSeparator("") + let hexCharacterSet = CharacterSet(charactersIn: "0123456789abcdefABCDEF") + let hexOnlyString = hexString.components(separatedBy: hexCharacterSet.inverted).joined(separator: "") guard hexOnlyString.characters.count >= 6 else { // There is a bug in stable Xcode 7.3 (SR-704) where returning nil @@ -41,16 +41,16 @@ extension UIColor { return nil } - let redCharacterRange = hexOnlyString.startIndex..(cellType: T.Type) { - registerClass(cellType.self, forCellReuseIdentifier: cellType.defaultReuseIdentifier) + public func register(_ cellType: T.Type) where T: ReusableView { + self.register(cellType.self, forCellReuseIdentifier: cellType.defaultReuseIdentifier) } /** @@ -30,10 +30,10 @@ public extension UITableView { - parameter cellType: The cell subclass type that conforms to both ReusableView and NibLoadableView protocols */ - public func register(cellType: T.Type) { - let bundle = NSBundle(forClass: cellType.self) + public func register(_ cellType: T.Type) where T: ReusableView, T: NibLoadableView { + let bundle = Bundle(for: cellType.self) let nib = UINib(nibName: cellType.nibName, bundle: bundle) - registerNib(nib, forCellReuseIdentifier: cellType.defaultReuseIdentifier) + self.register(nib, forCellReuseIdentifier: cellType.defaultReuseIdentifier) } /** @@ -43,8 +43,8 @@ public extension UITableView { - parameter indexPath: The index path of the cell to dequeue */ - public func dequeueReusableCell(forIndexPath indexPath: NSIndexPath) -> T { - guard let cell = dequeueReusableCellWithIdentifier(T.defaultReuseIdentifier, forIndexPath: indexPath) as? T else { + public func dequeueReusableCell(forIndexPath indexPath: IndexPath) -> T where T: ReusableView { + guard let cell = self.dequeueReusableCell(withIdentifier: T.defaultReuseIdentifier, for: indexPath) as? T else { fatalError("Could not dequeue table view cell with identifier: \(T.defaultReuseIdentifier)") } return cell diff --git a/Astro/UI/UIViewController+AstroGadgets.swift b/Astro/UI/UIViewController+AstroGadgets.swift index bd4b1f4..61a1f20 100644 --- a/Astro/UI/UIViewController+AstroGadgets.swift +++ b/Astro/UI/UIViewController+AstroGadgets.swift @@ -24,10 +24,10 @@ public extension UIViewController { - parameter childViewController: to be added inside of the parent view controller (i.e. self) - parameter inContainer: the UIView where the childViewController's UIView will be added as a subview */ - public func addChildViewController(childViewController: UIViewController, inContainer view: UIView) { + public func addChildViewController(_ childViewController: UIViewController, inContainer view: UIView) { self.addChildViewController(childViewController) view.addSubview(childViewController.view) - childViewController.didMoveToParentViewController(self) + childViewController.didMove(toParentViewController: self) } } @@ -42,10 +42,10 @@ public extension UIViewController { - parameter title: - of the alert - parameter message: - of the alert */ - public func quickAlert(title title: String?, message: String?) { - let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.Alert) - alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil)) - presentViewController(alert, animated: true, completion: nil) + public func quickAlert(title: String?, message: String?) { + let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert) + alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil)) + present(alert, animated: true, completion: nil) } /** diff --git a/Astro/Utils/Queue.swift b/Astro/Utils/Queue.swift index ba48edd..21c67af 100644 --- a/Astro/Utils/Queue.swift +++ b/Astro/Utils/Queue.swift @@ -12,16 +12,16 @@ import Foundation public protocol ExecutableQueue { - var queue: dispatch_queue_t { get } + var queue: DispatchQueue { get } } public extension ExecutableQueue { - public func execute(closure: () -> Void) { - dispatch_async(queue, closure) + public func execute(_ closure: @escaping () -> Void) { + queue.async(execute: closure) } - public func executeAfter(delay delay: NSTimeInterval, closure: () -> Void) { - let delayTime = dispatch_time(DISPATCH_TIME_NOW, Int64(delay * Double(NSEC_PER_SEC))) - dispatch_after(delayTime, queue, closure) + public func executeAfter(delay: TimeInterval, closure: @escaping () -> Void) { + let delayTime = DispatchTime.now() + Double(Int64(delay * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC) + queue.asyncAfter(deadline: delayTime, execute: closure) } } @@ -29,24 +29,24 @@ public extension ExecutableQueue { Queue provides a prettier interface for the most common needs of dispatching onto different GCD Queues. If you require something more powerfull consider Async. */ public enum Queue: ExecutableQueue { - case Main - case UserInteractive - case UserInitiated - case Utility - case Background + case main + case userInteractive + case userInitiated + case utility + case background - public var queue: dispatch_queue_t { + public var queue: DispatchQueue { switch self { - case .Main: - return dispatch_get_main_queue() - case .UserInteractive: - return dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0) - case .UserInitiated: - return dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0) - case .Utility: - return dispatch_get_global_queue(QOS_CLASS_UTILITY, 0) - case .Background: - return dispatch_get_global_queue(QOS_CLASS_BACKGROUND, 0) + case .main: + return DispatchQueue.main + case .userInteractive: + return DispatchQueue.global(qos: DispatchQoS.QoSClass.userInteractive) + case .userInitiated: + return DispatchQueue.global(qos: DispatchQoS.QoSClass.userInitiated) + case .utility: + return DispatchQueue.global(qos: DispatchQoS.QoSClass.utility) + case .background: + return DispatchQueue.global(qos: DispatchQoS.QoSClass.background) } } } diff --git a/AstroTests/Unit Tests/Logging/LoggerSpec.swift b/AstroTests/Unit Tests/Logging/LoggerSpec.swift index 7ea9249..2d62b3f 100644 --- a/AstroTests/Unit Tests/Logging/LoggerSpec.swift +++ b/AstroTests/Unit Tests/Logging/LoggerSpec.swift @@ -16,7 +16,7 @@ import Nimble class LogRecorder: Logger { var messages = [String]() - func log(level: Log.Level, message: String) { + func log(_ level: Log.Level, message: String) { messages.append(message) } } @@ -140,4 +140,4 @@ class LogSpec: QuickSpec { } } } -} \ No newline at end of file +} diff --git a/AstroTests/Unit Tests/SpecHelpers.swift b/AstroTests/Unit Tests/SpecHelpers.swift index 4f006d0..0a04827 100644 --- a/AstroTests/Unit Tests/SpecHelpers.swift +++ b/AstroTests/Unit Tests/SpecHelpers.swift @@ -30,19 +30,19 @@ extension Task { // Improved DSL for Nocilla -func stubRoute(route: Route) -> LSStubRequestDSL { +func stubRoute(_ route: Route) -> LSStubRequestDSL { return stubRequest(route.method.rawValue, route.URL.absoluteString).withHeaders(route.URLRequest.allHTTPHeaderFields).withBody(route.URLRequest.HTTPBody) } extension LSStubRequestDSL { - func andReturn(status: HTTPStatusCode) -> LSStubResponseDSL { + func andReturn(_ status: HTTPStatusCode) -> LSStubResponseDSL { return andReturn(status.rawValue) } } extension LSStubResponseDSL { - func withJSON(json: JSON) -> LSStubResponseDSL { - let body = try? json.serialize() ?? NSData() + func withJSON(_ json: JSON) -> LSStubResponseDSL { + let body = try? json.serialize() ?? Data() return withHeader("Content-Type", "application/json").withBody(body) } } diff --git a/AstroTests/Unit Tests/Utils/EnumCountableSpec.swift b/AstroTests/Unit Tests/Utils/EnumCountableSpec.swift index ea40a90..0393166 100644 --- a/AstroTests/Unit Tests/Utils/EnumCountableSpec.swift +++ b/AstroTests/Unit Tests/Utils/EnumCountableSpec.swift @@ -15,14 +15,14 @@ import Nimble class EnumCountableSpec: QuickSpec { - private enum Enum2: Int, EnumCountable { + fileprivate enum Enum2: Int, EnumCountable { case case1 = 0 case case2 static let count = Enum2.countCases() } - private enum Enum6: Int, EnumCountable { + fileprivate enum Enum6: Int, EnumCountable { case case1 = 0 case case2 case case3 @@ -33,7 +33,7 @@ class EnumCountableSpec: QuickSpec { static let count = Enum6.countCases() } - private enum EnumBad: Int, EnumCountable { + fileprivate enum EnumBad: Int, EnumCountable { case case1 = 5 case case2 diff --git a/Podfile b/Podfile index a9b148d..d7e0685 100644 --- a/Podfile +++ b/Podfile @@ -8,9 +8,9 @@ source 'https://github.com/CocoaPods/Specs.git' target 'Astro' do pod "Astro", :path => "." - pod 'Alamofire', '~> 3.5' - pod 'Freddy', '~> 2.1' - pod 'SwiftTask', '~> 5.0' + pod 'Alamofire', '~> 4.0' + pod 'Freddy', '~> 3.0' + pod 'SwiftTask' target 'AstroTests' do inherit! :search_paths diff --git a/Pods/Local Podspecs/Astro.podspec.json b/Pods/Local Podspecs/Astro.podspec.json index 86f89be..175e492 100644 --- a/Pods/Local Podspecs/Astro.podspec.json +++ b/Pods/Local Podspecs/Astro.podspec.json @@ -1,6 +1,6 @@ { "name": "Astro", - "version": "1.1.0", + "version": "2.0.0", "summary": "A RoboPod containing a small collection of utilities for project reuse", "homepage": "https://RobotsAndPencils.com", "license": { @@ -15,7 +15,7 @@ }, "source": { "git": "https://github.com/RobotsAndPencils/Astro.git", - "tag": "1.1.0" + "tag": "2.0.0" }, "platforms": { "ios": "8.0" @@ -34,10 +34,10 @@ ], "Alamofire": [ - "~> 3.3" + "~> 4.0" ], "Freddy": [ - "~> 2.0" + "3.0.0" ], "SwiftTask": [ "5.0" diff --git a/Pods/Target Support Files/Alamofire/Alamofire-dummy.m b/Pods/Target Support Files/Alamofire/Alamofire-dummy.m deleted file mode 100644 index a6c4594..0000000 --- a/Pods/Target Support Files/Alamofire/Alamofire-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Alamofire : NSObject -@end -@implementation PodsDummy_Alamofire -@end diff --git a/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch b/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch deleted file mode 100644 index aa992a4..0000000 --- a/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch +++ /dev/null @@ -1,4 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - diff --git a/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h deleted file mode 100644 index 6b71676..0000000 --- a/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - - -FOUNDATION_EXPORT double AlamofireVersionNumber; -FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; - diff --git a/Pods/Target Support Files/Alamofire/Alamofire.modulemap b/Pods/Target Support Files/Alamofire/Alamofire.modulemap deleted file mode 100644 index d1f125f..0000000 --- a/Pods/Target Support Files/Alamofire/Alamofire.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Alamofire { - umbrella header "Alamofire-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Alamofire/Alamofire.xcconfig b/Pods/Target Support Files/Alamofire/Alamofire.xcconfig deleted file mode 100644 index 772ef0b..0000000 --- a/Pods/Target Support Files/Alamofire/Alamofire.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Alamofire -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} -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/Alamofire/Info.plist b/Pods/Target Support Files/Alamofire/Info.plist deleted file mode 100644 index 078bbf3..0000000 --- a/Pods/Target Support Files/Alamofire/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.5.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Astro/Astro-dummy.m b/Pods/Target Support Files/Astro/Astro-dummy.m deleted file mode 100644 index 8f65378..0000000 --- a/Pods/Target Support Files/Astro/Astro-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Astro : NSObject -@end -@implementation PodsDummy_Astro -@end diff --git a/Pods/Target Support Files/Astro/Astro-prefix.pch b/Pods/Target Support Files/Astro/Astro-prefix.pch deleted file mode 100644 index aa992a4..0000000 --- a/Pods/Target Support Files/Astro/Astro-prefix.pch +++ /dev/null @@ -1,4 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - diff --git a/Pods/Target Support Files/Astro/Astro-umbrella.h b/Pods/Target Support Files/Astro/Astro-umbrella.h deleted file mode 100644 index db9dc85..0000000 --- a/Pods/Target Support Files/Astro/Astro-umbrella.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - - -FOUNDATION_EXPORT double AstroVersionNumber; -FOUNDATION_EXPORT const unsigned char AstroVersionString[]; - diff --git a/Pods/Target Support Files/Astro/Astro.modulemap b/Pods/Target Support Files/Astro/Astro.modulemap deleted file mode 100644 index 811a32e..0000000 --- a/Pods/Target Support Files/Astro/Astro.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Astro { - umbrella header "Astro-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Astro/Astro.xcconfig b/Pods/Target Support Files/Astro/Astro.xcconfig deleted file mode 100644 index a71a07b..0000000 --- a/Pods/Target Support Files/Astro/Astro.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Astro -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Freddy" "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" -OTHER_LDFLAGS = -framework "UIKit" -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} -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/Astro/Info.plist b/Pods/Target Support Files/Astro/Info.plist deleted file mode 100644 index 21a30b4..0000000 --- a/Pods/Target Support Files/Astro/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 - 1.1.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Freddy/Freddy-dummy.m b/Pods/Target Support Files/Freddy/Freddy-dummy.m deleted file mode 100644 index 49ba8f5..0000000 --- a/Pods/Target Support Files/Freddy/Freddy-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Freddy : NSObject -@end -@implementation PodsDummy_Freddy -@end diff --git a/Pods/Target Support Files/Freddy/Freddy-prefix.pch b/Pods/Target Support Files/Freddy/Freddy-prefix.pch deleted file mode 100644 index aa992a4..0000000 --- a/Pods/Target Support Files/Freddy/Freddy-prefix.pch +++ /dev/null @@ -1,4 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - diff --git a/Pods/Target Support Files/Freddy/Freddy-umbrella.h b/Pods/Target Support Files/Freddy/Freddy-umbrella.h deleted file mode 100644 index 7e27ee2..0000000 --- a/Pods/Target Support Files/Freddy/Freddy-umbrella.h +++ /dev/null @@ -1,7 +0,0 @@ -#import - -#import "Freddy.h" - -FOUNDATION_EXPORT double FreddyVersionNumber; -FOUNDATION_EXPORT const unsigned char FreddyVersionString[]; - diff --git a/Pods/Target Support Files/Freddy/Freddy.modulemap b/Pods/Target Support Files/Freddy/Freddy.modulemap deleted file mode 100644 index 3a4c0c7..0000000 --- a/Pods/Target Support Files/Freddy/Freddy.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Freddy { - umbrella header "Freddy-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Freddy/Freddy.xcconfig b/Pods/Target Support Files/Freddy/Freddy.xcconfig deleted file mode 100644 index ce5d0ea..0000000 --- a/Pods/Target Support Files/Freddy/Freddy.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Freddy -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} -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/Freddy/Info.plist b/Pods/Target Support Files/Freddy/Info.plist deleted file mode 100644 index 7f71fff..0000000 --- a/Pods/Target Support Files/Freddy/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.1.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Nimble/Info.plist b/Pods/Target Support Files/Nimble/Info.plist deleted file mode 100644 index c26f36f..0000000 --- a/Pods/Target Support Files/Nimble/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.1.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Nimble/Nimble-dummy.m b/Pods/Target Support Files/Nimble/Nimble-dummy.m deleted file mode 100644 index e8177ab..0000000 --- a/Pods/Target Support Files/Nimble/Nimble-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Nimble : NSObject -@end -@implementation PodsDummy_Nimble -@end diff --git a/Pods/Target Support Files/Nimble/Nimble-prefix.pch b/Pods/Target Support Files/Nimble/Nimble-prefix.pch deleted file mode 100644 index aa992a4..0000000 --- a/Pods/Target Support Files/Nimble/Nimble-prefix.pch +++ /dev/null @@ -1,4 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - diff --git a/Pods/Target Support Files/Nimble/Nimble-umbrella.h b/Pods/Target Support Files/Nimble/Nimble-umbrella.h deleted file mode 100644 index 3701312..0000000 --- a/Pods/Target Support Files/Nimble/Nimble-umbrella.h +++ /dev/null @@ -1,10 +0,0 @@ -#import - -#import "DSL.h" -#import "NMBExceptionCapture.h" -#import "NMBStringify.h" -#import "Nimble.h" - -FOUNDATION_EXPORT double NimbleVersionNumber; -FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; - diff --git a/Pods/Target Support Files/Nimble/Nimble.modulemap b/Pods/Target Support Files/Nimble/Nimble.modulemap deleted file mode 100644 index 6f77009..0000000 --- a/Pods/Target Support Files/Nimble/Nimble.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Nimble { - umbrella header "Nimble-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Nimble/Nimble.xcconfig b/Pods/Target Support Files/Nimble/Nimble.xcconfig deleted file mode 100644 index bc9e893..0000000 --- a/Pods/Target Support Files/Nimble/Nimble.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Nimble -ENABLE_BITCODE = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" -OTHER_LDFLAGS = -weak-lswiftXCTest -weak_framework "XCTest" -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} -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/Nocilla/Info.plist b/Pods/Target Support Files/Nocilla/Info.plist deleted file mode 100644 index 1b8f7d0..0000000 --- a/Pods/Target Support Files/Nocilla/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 - 0.11.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Nocilla/Nocilla-dummy.m b/Pods/Target Support Files/Nocilla/Nocilla-dummy.m deleted file mode 100644 index bf67e7a..0000000 --- a/Pods/Target Support Files/Nocilla/Nocilla-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Nocilla : NSObject -@end -@implementation PodsDummy_Nocilla -@end diff --git a/Pods/Target Support Files/Nocilla/Nocilla-prefix.pch b/Pods/Target Support Files/Nocilla/Nocilla-prefix.pch deleted file mode 100644 index aa992a4..0000000 --- a/Pods/Target Support Files/Nocilla/Nocilla-prefix.pch +++ /dev/null @@ -1,4 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - diff --git a/Pods/Target Support Files/Nocilla/Nocilla-umbrella.h b/Pods/Target Support Files/Nocilla/Nocilla-umbrella.h deleted file mode 100644 index e8b33f7..0000000 --- a/Pods/Target Support Files/Nocilla/Nocilla-umbrella.h +++ /dev/null @@ -1,18 +0,0 @@ -#import - -#import "NSData+Nocilla.h" -#import "NSString+Nocilla.h" -#import "LSStubRequestDSL.h" -#import "LSStubResponseDSL.h" -#import "LSNocilla.h" -#import "LSMatcheable.h" -#import "LSMatcher.h" -#import "NSData+Matcheable.h" -#import "NSRegularExpression+Matcheable.h" -#import "NSString+Matcheable.h" -#import "LSHTTPBody.h" -#import "Nocilla.h" - -FOUNDATION_EXPORT double NocillaVersionNumber; -FOUNDATION_EXPORT const unsigned char NocillaVersionString[]; - diff --git a/Pods/Target Support Files/Nocilla/Nocilla.modulemap b/Pods/Target Support Files/Nocilla/Nocilla.modulemap deleted file mode 100644 index 01df4e2..0000000 --- a/Pods/Target Support Files/Nocilla/Nocilla.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Nocilla { - umbrella header "Nocilla-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Nocilla/Nocilla.xcconfig b/Pods/Target Support Files/Nocilla/Nocilla.xcconfig deleted file mode 100644 index 2598e3c..0000000 --- a/Pods/Target Support Files/Nocilla/Nocilla.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Nocilla -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" -OTHER_LDFLAGS = -framework "CFNetwork" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/Pods-Astro/Info.plist b/Pods/Target Support Files/Pods-Astro/Info.plist deleted file mode 100644 index 2243fe6..0000000 --- a/Pods/Target Support Files/Pods-Astro/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 - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro-acknowledgements.markdown b/Pods/Target Support Files/Pods-Astro/Pods-Astro-acknowledgements.markdown deleted file mode 100644 index c35eb93..0000000 --- a/Pods/Target Support Files/Pods-Astro/Pods-Astro-acknowledgements.markdown +++ /dev/null @@ -1,85 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## Alamofire - -Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -## Astro - -Copyright (c) 2015 Robots and Pencils, 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: -Neither the name of the Robots and Pencils, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -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. - - -## Freddy - -The MIT License (MIT) - -Copyright (c) 2015 Big Nerd Ranch Inc - -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. - - -## SwiftTask - -The MIT License (MIT) - -Copyright (c) 2014 Yasuhiro Inami - -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. - -Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro-acknowledgements.plist b/Pods/Target Support Files/Pods-Astro/Pods-Astro-acknowledgements.plist deleted file mode 100644 index ec92f7e..0000000 --- a/Pods/Target Support Files/Pods-Astro/Pods-Astro-acknowledgements.plist +++ /dev/null @@ -1,127 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - Title - Alamofire - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2015 Robots and Pencils, 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: -Neither the name of the Robots and Pencils, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -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. - - Title - Astro - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2015 Big Nerd Ranch Inc - -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. - - Title - Freddy - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2014 Yasuhiro Inami - -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. - - Title - SwiftTask - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro-dummy.m b/Pods/Target Support Files/Pods-Astro/Pods-Astro-dummy.m deleted file mode 100644 index 566313e..0000000 --- a/Pods/Target Support Files/Pods-Astro/Pods-Astro-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_Astro : NSObject -@end -@implementation PodsDummy_Pods_Astro -@end diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro-frameworks.sh b/Pods/Target Support Files/Pods-Astro/Pods-Astro-frameworks.sh deleted file mode 100755 index 7c2978c..0000000 --- a/Pods/Target Support Files/Pods-Astro/Pods-Astro-frameworks.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/sh -set -e - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identitiy - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" - fi -} - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - # Get architectures for current file - archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" - stripped="" - for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" || exit 1 - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi -} - - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" - install_framework "$BUILT_PRODUCTS_DIR/Astro/Astro.framework" - install_framework "$BUILT_PRODUCTS_DIR/Freddy/Freddy.framework" - install_framework "$BUILT_PRODUCTS_DIR/SwiftTask/SwiftTask.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" - install_framework "$BUILT_PRODUCTS_DIR/Astro/Astro.framework" - install_framework "$BUILT_PRODUCTS_DIR/Freddy/Freddy.framework" - install_framework "$BUILT_PRODUCTS_DIR/SwiftTask/SwiftTask.framework" -fi diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro-resources.sh b/Pods/Target Support Files/Pods-Astro/Pods-Astro-resources.sh deleted file mode 100755 index 0a15615..0000000 --- a/Pods/Target Support Files/Pods-Astro/Pods-Astro-resources.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -set -e - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -case "${TARGETED_DEVICE_FAMILY}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -realpath() { - DIRECTORY="$(cd "${1%/*}" && pwd)" - FILENAME="${1##*/}" - echo "$DIRECTORY/$FILENAME" -} - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE=$(realpath "$RESOURCE_PATH") - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "`realpath $PODS_ROOT`*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro-umbrella.h b/Pods/Target Support Files/Pods-Astro/Pods-Astro-umbrella.h deleted file mode 100644 index 80a9e38..0000000 --- a/Pods/Target Support Files/Pods-Astro/Pods-Astro-umbrella.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - - -FOUNDATION_EXPORT double Pods_AstroVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_AstroVersionString[]; - diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro.debug.xcconfig b/Pods/Target Support Files/Pods-Astro/Pods-Astro.debug.xcconfig deleted file mode 100644 index d8c490f..0000000 --- a/Pods/Target Support Files/Pods-Astro/Pods-Astro.debug.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Astro" "$PODS_CONFIGURATION_BUILD_DIR/Freddy" "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask" -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/Astro/Astro.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Freddy/Freddy.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask/SwiftTask.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Astro" -framework "Freddy" -framework "SwiftTask" -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 diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro.modulemap b/Pods/Target Support Files/Pods-Astro/Pods-Astro.modulemap deleted file mode 100644 index 950a0e4..0000000 --- a/Pods/Target Support Files/Pods-Astro/Pods-Astro.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_Astro { - umbrella header "Pods-Astro-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro.release.xcconfig b/Pods/Target Support Files/Pods-Astro/Pods-Astro.release.xcconfig deleted file mode 100644 index d8c490f..0000000 --- a/Pods/Target Support Files/Pods-Astro/Pods-Astro.release.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Astro" "$PODS_CONFIGURATION_BUILD_DIR/Freddy" "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask" -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/Astro/Astro.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Freddy/Freddy.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask/SwiftTask.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Astro" -framework "Freddy" -framework "SwiftTask" -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 diff --git a/Pods/Target Support Files/Pods-AstroTests/Info.plist b/Pods/Target Support Files/Pods-AstroTests/Info.plist deleted file mode 100644 index 2243fe6..0000000 --- a/Pods/Target Support Files/Pods-AstroTests/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 - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-acknowledgements.markdown b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-acknowledgements.markdown deleted file mode 100644 index 6c951aa..0000000 --- a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-acknowledgements.markdown +++ /dev/null @@ -1,437 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## Nimble - -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 Quick Team - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -## Nocilla - -Copyright (c) 2012 Luis Solano Bonet -MIT License - -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. - -## Quick - -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014, Quick Team - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-acknowledgements.plist b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-acknowledgements.plist deleted file mode 100644 index 32fc511..0000000 --- a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-acknowledgements.plist +++ /dev/null @@ -1,475 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 Quick Team - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Title - Nimble - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2012 Luis Solano Bonet -MIT License - -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. - Title - Nocilla - Type - PSGroupSpecifier - - - FooterText - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014, Quick Team - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Title - Quick - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-dummy.m b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-dummy.m deleted file mode 100644 index d3b668e..0000000 --- a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_AstroTests : NSObject -@end -@implementation PodsDummy_Pods_AstroTests -@end diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-frameworks.sh b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-frameworks.sh deleted file mode 100755 index 9913aab..0000000 --- a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-frameworks.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh -set -e - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identitiy - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" - fi -} - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - # Get architectures for current file - archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" - stripped="" - for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" || exit 1 - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi -} - - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Nimble/Nimble.framework" - install_framework "$BUILT_PRODUCTS_DIR/Nocilla/Nocilla.framework" - install_framework "$BUILT_PRODUCTS_DIR/Quick/Quick.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Nimble/Nimble.framework" - install_framework "$BUILT_PRODUCTS_DIR/Nocilla/Nocilla.framework" - install_framework "$BUILT_PRODUCTS_DIR/Quick/Quick.framework" -fi diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-resources.sh b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-resources.sh deleted file mode 100755 index 0a15615..0000000 --- a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-resources.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -set -e - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -case "${TARGETED_DEVICE_FAMILY}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -realpath() { - DIRECTORY="$(cd "${1%/*}" && pwd)" - FILENAME="${1##*/}" - echo "$DIRECTORY/$FILENAME" -} - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE=$(realpath "$RESOURCE_PATH") - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "`realpath $PODS_ROOT`*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-umbrella.h b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-umbrella.h deleted file mode 100644 index 8d80a8c..0000000 --- a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-umbrella.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - - -FOUNDATION_EXPORT double Pods_AstroTestsVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_AstroTestsVersionString[]; - diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.debug.xcconfig b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.debug.xcconfig deleted file mode 100644 index 29ae579..0000000 --- a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.debug.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$PODS_CONFIGURATION_BUILD_DIR/Nimble" "$PODS_CONFIGURATION_BUILD_DIR/Nocilla" "$PODS_CONFIGURATION_BUILD_DIR/Quick" "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Astro" "$PODS_CONFIGURATION_BUILD_DIR/Freddy" "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask" -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/Nimble/Nimble.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Nocilla/Nocilla.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Quick/Quick.framework/Headers" $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Astro/Astro.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Freddy/Freddy.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask/SwiftTask.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Nimble" -framework "Nocilla" -framework "Quick" -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 diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.modulemap b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.modulemap deleted file mode 100644 index 9495844..0000000 --- a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_AstroTests { - umbrella header "Pods-AstroTests-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.release.xcconfig b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.release.xcconfig deleted file mode 100644 index 29ae579..0000000 --- a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.release.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$PODS_CONFIGURATION_BUILD_DIR/Nimble" "$PODS_CONFIGURATION_BUILD_DIR/Nocilla" "$PODS_CONFIGURATION_BUILD_DIR/Quick" "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Astro" "$PODS_CONFIGURATION_BUILD_DIR/Freddy" "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask" -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/Nimble/Nimble.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Nocilla/Nocilla.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Quick/Quick.framework/Headers" $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Astro/Astro.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Freddy/Freddy.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask/SwiftTask.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Nimble" -framework "Nocilla" -framework "Quick" -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 diff --git a/Pods/Target Support Files/Quick/Info.plist b/Pods/Target Support Files/Quick/Info.plist deleted file mode 100644 index b8a90bb..0000000 --- a/Pods/Target Support Files/Quick/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 - 0.9.3 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Quick/Quick-dummy.m b/Pods/Target Support Files/Quick/Quick-dummy.m deleted file mode 100644 index 54d7dc0..0000000 --- a/Pods/Target Support Files/Quick/Quick-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Quick : NSObject -@end -@implementation PodsDummy_Quick -@end diff --git a/Pods/Target Support Files/Quick/Quick-prefix.pch b/Pods/Target Support Files/Quick/Quick-prefix.pch deleted file mode 100644 index aa992a4..0000000 --- a/Pods/Target Support Files/Quick/Quick-prefix.pch +++ /dev/null @@ -1,4 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - diff --git a/Pods/Target Support Files/Quick/Quick-umbrella.h b/Pods/Target Support Files/Quick/Quick-umbrella.h deleted file mode 100644 index c1aab14..0000000 --- a/Pods/Target Support Files/Quick/Quick-umbrella.h +++ /dev/null @@ -1,10 +0,0 @@ -#import - -#import "QuickConfiguration.h" -#import "QCKDSL.h" -#import "Quick.h" -#import "QuickSpec.h" - -FOUNDATION_EXPORT double QuickVersionNumber; -FOUNDATION_EXPORT const unsigned char QuickVersionString[]; - diff --git a/Pods/Target Support Files/Quick/Quick.modulemap b/Pods/Target Support Files/Quick/Quick.modulemap deleted file mode 100644 index 1d12b21..0000000 --- a/Pods/Target Support Files/Quick/Quick.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Quick { - umbrella header "Quick-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Quick/Quick.xcconfig b/Pods/Target Support Files/Quick/Quick.xcconfig deleted file mode 100644 index f25ce83..0000000 --- a/Pods/Target Support Files/Quick/Quick.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Quick -ENABLE_BITCODE = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" -OTHER_LDFLAGS = -framework "XCTest" -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} -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/SwiftTask/Info.plist b/Pods/Target Support Files/SwiftTask/Info.plist deleted file mode 100644 index e2771ff..0000000 --- a/Pods/Target Support Files/SwiftTask/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 - 5.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/SwiftTask/SwiftTask-dummy.m b/Pods/Target Support Files/SwiftTask/SwiftTask-dummy.m deleted file mode 100644 index 05ecdf0..0000000 --- a/Pods/Target Support Files/SwiftTask/SwiftTask-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_SwiftTask : NSObject -@end -@implementation PodsDummy_SwiftTask -@end diff --git a/Pods/Target Support Files/SwiftTask/SwiftTask-prefix.pch b/Pods/Target Support Files/SwiftTask/SwiftTask-prefix.pch deleted file mode 100644 index aa992a4..0000000 --- a/Pods/Target Support Files/SwiftTask/SwiftTask-prefix.pch +++ /dev/null @@ -1,4 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - diff --git a/Pods/Target Support Files/SwiftTask/SwiftTask-umbrella.h b/Pods/Target Support Files/SwiftTask/SwiftTask-umbrella.h deleted file mode 100644 index 5c4a480..0000000 --- a/Pods/Target Support Files/SwiftTask/SwiftTask-umbrella.h +++ /dev/null @@ -1,7 +0,0 @@ -#import - -#import "SwiftTask.h" - -FOUNDATION_EXPORT double SwiftTaskVersionNumber; -FOUNDATION_EXPORT const unsigned char SwiftTaskVersionString[]; - diff --git a/Pods/Target Support Files/SwiftTask/SwiftTask.modulemap b/Pods/Target Support Files/SwiftTask/SwiftTask.modulemap deleted file mode 100644 index d539e70..0000000 --- a/Pods/Target Support Files/SwiftTask/SwiftTask.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module SwiftTask { - umbrella header "SwiftTask-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/SwiftTask/SwiftTask.xcconfig b/Pods/Target Support Files/SwiftTask/SwiftTask.xcconfig deleted file mode 100644 index e7e7efe..0000000 --- a/Pods/Target Support Files/SwiftTask/SwiftTask.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SwiftTask -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} -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES From 6600f7a6352582255ded860d01d216210dcb0ccf Mon Sep 17 00:00:00 2001 From: Paul Thorsteinson Date: Mon, 19 Sep 2016 11:15:37 -0600 Subject: [PATCH 02/11] WIP: Converting to latest alamofire --- Astro.podspec | 9 +- Astro.xcodeproj/project.pbxproj | 6 +- Astro/Networking/NetworkService.swift | 10 +- Astro/Networking/NetworkServiceLogger.swift | 4 +- Astro/Networking/Route.swift | 2 +- Astro/UI/NibLoadableView.swift | 2 +- Podfile | 4 +- Podfile.lock | 58 +- Pods/Alamofire/README.md | 1690 +++++++++++------ Pods/Alamofire/Source/AFError.swift | 450 +++++ Pods/Alamofire/Source/Alamofire.swift | 611 +++--- .../Source/DispatchQueue+Alamofire.swift | 42 + Pods/Alamofire/Source/Download.swift | 252 --- Pods/Alamofire/Source/Error.swift | 88 - Pods/Alamofire/Source/Manager.swift | 789 -------- Pods/Alamofire/Source/MultipartFormData.swift | 638 +++---- .../Source/NetworkReachabilityManager.swift | 152 +- Pods/Alamofire/Source/Notifications.swift | 35 +- Pods/Alamofire/Source/ParameterEncoding.swift | 486 +++-- Pods/Alamofire/Source/Request.swift | 848 +++++---- Pods/Alamofire/Source/Response.swift | 255 ++- .../Source/ResponseSerialization.swift | 726 +++++-- Pods/Alamofire/Source/Result.swift | 41 +- Pods/Alamofire/Source/ServerTrustPolicy.swift | 261 ++- Pods/Alamofire/Source/SessionDelegate.swift | 681 +++++++ Pods/Alamofire/Source/SessionManager.swift | 776 ++++++++ Pods/Alamofire/Source/Stream.swift | 182 -- Pods/Alamofire/Source/TaskDelegate.swift | 448 +++++ Pods/Alamofire/Source/Timeline.swift | 36 +- Pods/Alamofire/Source/Upload.swift | 382 ---- Pods/Alamofire/Source/Validation.swift | 367 ++-- Pods/Freddy/README.md | 62 +- Pods/Freddy/Sources/JSON.swift | 59 +- Pods/Freddy/Sources/JSONDecodable.swift | 78 +- Pods/Freddy/Sources/JSONEncodable.swift | 30 +- .../Freddy/Sources/JSONEncodingDetector.swift | 40 +- .../Sources/JSONLiteralConvertible.swift | 42 +- Pods/Freddy/Sources/JSONParser.swift | 447 ++--- Pods/Freddy/Sources/JSONParsing.swift | 64 +- Pods/Freddy/Sources/JSONSerializing.swift | 53 +- Pods/Freddy/Sources/JSONSubscripting.swift | 398 ++-- Pods/Local Podspecs/Astro.podspec.json | 9 +- Pods/Local Podspecs/SwiftTask.podspec.json | 24 + Pods/Manifest.lock | 58 +- Pods/Pods.xcodeproj/project.pbxproj | 1290 +++++++------ Pods/SwiftTask/SwiftTask/Cancellable.swift | 21 +- Pods/SwiftTask/SwiftTask/SwiftTask.swift | 161 +- Pods/SwiftTask/SwiftTask/_Atomic.swift | 22 +- Pods/SwiftTask/SwiftTask/_RecursiveLock.swift | 8 +- Pods/SwiftTask/SwiftTask/_StateMachine.swift | 36 +- .../Alamofire/Alamofire-dummy.m | 5 + .../Alamofire/Alamofire-prefix.pch | 4 + .../Alamofire/Alamofire-umbrella.h | 6 + .../Alamofire/Alamofire.modulemap | 6 + .../Alamofire/Alamofire.xcconfig | 9 + .../Target Support Files/Alamofire/Info.plist | 26 + Pods/Target Support Files/Astro/Astro-dummy.m | 5 + .../Astro/Astro-prefix.pch | 4 + .../Astro/Astro-umbrella.h | 6 + .../Astro/Astro.modulemap | 6 + .../Target Support Files/Astro/Astro.xcconfig | 12 + Pods/Target Support Files/Astro/Info.plist | 26 + .../Freddy/Freddy-dummy.m | 5 + .../Freddy/Freddy-prefix.pch | 4 + .../Freddy/Freddy-umbrella.h | 7 + .../Freddy/Freddy.modulemap | 6 + .../Freddy/Freddy.xcconfig | 10 + Pods/Target Support Files/Freddy/Info.plist | 26 + Pods/Target Support Files/Nimble/Info.plist | 26 + .../Nimble/Nimble-dummy.m | 5 + .../Nimble/Nimble-prefix.pch | 4 + .../Nimble/Nimble-umbrella.h | 10 + .../Nimble/Nimble.modulemap | 6 + .../Nimble/Nimble.xcconfig | 12 + Pods/Target Support Files/Nocilla/Info.plist | 26 + .../Nocilla/Nocilla-dummy.m | 5 + .../Nocilla/Nocilla-prefix.pch | 4 + .../Nocilla/Nocilla-umbrella.h | 18 + .../Nocilla/Nocilla.modulemap | 6 + .../Nocilla/Nocilla.xcconfig | 9 + .../Pods-Astro/Info.plist | 26 + .../Pods-Astro-acknowledgements.markdown | 85 + .../Pods-Astro-acknowledgements.plist | 135 ++ .../Pods-Astro/Pods-Astro-dummy.m | 5 + .../Pods-Astro/Pods-Astro-resources.sh | 102 + .../Pods-Astro/Pods-Astro-umbrella.h | 6 + .../Pods-Astro/Pods-Astro.debug.xcconfig | 10 + .../Pods-Astro/Pods-Astro.modulemap | 6 + .../Pods-Astro/Pods-Astro.release.xcconfig | 10 + .../Pods-AstroTests/Info.plist | 26 + .../Pods-AstroTests-acknowledgements.markdown | 519 +++++ .../Pods-AstroTests-acknowledgements.plist | 587 ++++++ .../Pods-AstroTests/Pods-AstroTests-dummy.m | 5 + .../Pods-AstroTests-frameworks.sh | 103 + .../Pods-AstroTests-resources.sh | 102 + .../Pods-AstroTests-umbrella.h | 6 + .../Pods-AstroTests.debug.xcconfig | 11 + .../Pods-AstroTests/Pods-AstroTests.modulemap | 6 + .../Pods-AstroTests.release.xcconfig | 11 + Pods/Target Support Files/Quick/Info.plist | 26 + Pods/Target Support Files/Quick/Quick-dummy.m | 5 + .../Quick/Quick-prefix.pch | 4 + .../Quick/Quick-umbrella.h | 10 + .../Quick/Quick.modulemap | 6 + .../Target Support Files/Quick/Quick.xcconfig | 12 + .../Target Support Files/SwiftTask/Info.plist | 26 + .../SwiftTask/SwiftTask-dummy.m | 5 + .../SwiftTask/SwiftTask-prefix.pch | 4 + .../SwiftTask/SwiftTask-umbrella.h | 7 + .../SwiftTask/SwiftTask.modulemap | 6 + .../SwiftTask/SwiftTask.xcconfig | 9 + 111 files changed, 9804 insertions(+), 5614 deletions(-) create mode 100644 Pods/Alamofire/Source/AFError.swift create mode 100644 Pods/Alamofire/Source/DispatchQueue+Alamofire.swift delete mode 100644 Pods/Alamofire/Source/Download.swift delete mode 100644 Pods/Alamofire/Source/Error.swift delete mode 100644 Pods/Alamofire/Source/Manager.swift create mode 100644 Pods/Alamofire/Source/SessionDelegate.swift create mode 100644 Pods/Alamofire/Source/SessionManager.swift delete mode 100644 Pods/Alamofire/Source/Stream.swift create mode 100644 Pods/Alamofire/Source/TaskDelegate.swift delete mode 100644 Pods/Alamofire/Source/Upload.swift create mode 100644 Pods/Local Podspecs/SwiftTask.podspec.json create mode 100644 Pods/Target Support Files/Alamofire/Alamofire-dummy.m create mode 100644 Pods/Target Support Files/Alamofire/Alamofire-prefix.pch create mode 100644 Pods/Target Support Files/Alamofire/Alamofire-umbrella.h create mode 100644 Pods/Target Support Files/Alamofire/Alamofire.modulemap create mode 100644 Pods/Target Support Files/Alamofire/Alamofire.xcconfig create mode 100644 Pods/Target Support Files/Alamofire/Info.plist create mode 100644 Pods/Target Support Files/Astro/Astro-dummy.m create mode 100644 Pods/Target Support Files/Astro/Astro-prefix.pch create mode 100644 Pods/Target Support Files/Astro/Astro-umbrella.h create mode 100644 Pods/Target Support Files/Astro/Astro.modulemap create mode 100644 Pods/Target Support Files/Astro/Astro.xcconfig create mode 100644 Pods/Target Support Files/Astro/Info.plist create mode 100644 Pods/Target Support Files/Freddy/Freddy-dummy.m create mode 100644 Pods/Target Support Files/Freddy/Freddy-prefix.pch create mode 100644 Pods/Target Support Files/Freddy/Freddy-umbrella.h create mode 100644 Pods/Target Support Files/Freddy/Freddy.modulemap create mode 100644 Pods/Target Support Files/Freddy/Freddy.xcconfig create mode 100644 Pods/Target Support Files/Freddy/Info.plist create mode 100644 Pods/Target Support Files/Nimble/Info.plist create mode 100644 Pods/Target Support Files/Nimble/Nimble-dummy.m create mode 100644 Pods/Target Support Files/Nimble/Nimble-prefix.pch create mode 100644 Pods/Target Support Files/Nimble/Nimble-umbrella.h create mode 100644 Pods/Target Support Files/Nimble/Nimble.modulemap create mode 100644 Pods/Target Support Files/Nimble/Nimble.xcconfig create mode 100644 Pods/Target Support Files/Nocilla/Info.plist create mode 100644 Pods/Target Support Files/Nocilla/Nocilla-dummy.m create mode 100644 Pods/Target Support Files/Nocilla/Nocilla-prefix.pch create mode 100644 Pods/Target Support Files/Nocilla/Nocilla-umbrella.h create mode 100644 Pods/Target Support Files/Nocilla/Nocilla.modulemap create mode 100644 Pods/Target Support Files/Nocilla/Nocilla.xcconfig create mode 100644 Pods/Target Support Files/Pods-Astro/Info.plist create mode 100644 Pods/Target Support Files/Pods-Astro/Pods-Astro-acknowledgements.markdown create mode 100644 Pods/Target Support Files/Pods-Astro/Pods-Astro-acknowledgements.plist create mode 100644 Pods/Target Support Files/Pods-Astro/Pods-Astro-dummy.m create mode 100755 Pods/Target Support Files/Pods-Astro/Pods-Astro-resources.sh create mode 100644 Pods/Target Support Files/Pods-Astro/Pods-Astro-umbrella.h create mode 100644 Pods/Target Support Files/Pods-Astro/Pods-Astro.debug.xcconfig create mode 100644 Pods/Target Support Files/Pods-Astro/Pods-Astro.modulemap create mode 100644 Pods/Target Support Files/Pods-Astro/Pods-Astro.release.xcconfig create mode 100644 Pods/Target Support Files/Pods-AstroTests/Info.plist create mode 100644 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-acknowledgements.markdown create mode 100644 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-acknowledgements.plist create mode 100644 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-dummy.m create mode 100755 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-frameworks.sh create mode 100755 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-resources.sh create mode 100644 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-umbrella.h create mode 100644 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.debug.xcconfig create mode 100644 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.modulemap create mode 100644 Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.release.xcconfig create mode 100644 Pods/Target Support Files/Quick/Info.plist create mode 100644 Pods/Target Support Files/Quick/Quick-dummy.m create mode 100644 Pods/Target Support Files/Quick/Quick-prefix.pch create mode 100644 Pods/Target Support Files/Quick/Quick-umbrella.h create mode 100644 Pods/Target Support Files/Quick/Quick.modulemap create mode 100644 Pods/Target Support Files/Quick/Quick.xcconfig create mode 100644 Pods/Target Support Files/SwiftTask/Info.plist create mode 100644 Pods/Target Support Files/SwiftTask/SwiftTask-dummy.m create mode 100644 Pods/Target Support Files/SwiftTask/SwiftTask-prefix.pch create mode 100644 Pods/Target Support Files/SwiftTask/SwiftTask-umbrella.h create mode 100644 Pods/Target Support Files/SwiftTask/SwiftTask.modulemap create mode 100644 Pods/Target Support Files/SwiftTask/SwiftTask.xcconfig diff --git a/Astro.podspec b/Astro.podspec index 11a3ee2..eb45937 100644 --- a/Astro.podspec +++ b/Astro.podspec @@ -29,9 +29,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI } s.source = { :git => "https://github.com/RobotsAndPencils/Astro.git", :tag => s.version.to_s } - s.ios.deployment_target = '8.0' - s.platform = :ios, '8.0' + s.ios.deployment_target = '9.0' + s.platform = :ios, '9.0' s.requires_arc = true + s.pod_target_xcconfig = { 'SWIFT_VERSION' => '3.0' } s.subspec 'Logging' do | log | log.source_files = 'Astro/Logging/**/*.swift' @@ -41,8 +42,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI net.source_files = 'Astro/Networking/**/*.swift' net.dependency 'Astro/Logging' net.dependency 'Alamofire', '~> 4.0' - net.dependency 'Freddy', '3.0' - net.dependency 'SwiftTask', '5.0' + net.dependency 'Freddy', '~> 3.0' + net.dependency 'SwiftTask', '~> 5.0' end s.subspec 'Security' do | security | diff --git a/Astro.xcodeproj/project.pbxproj b/Astro.xcodeproj/project.pbxproj index 1b56abf..3f72aa5 100644 --- a/Astro.xcodeproj/project.pbxproj +++ b/Astro.xcodeproj/project.pbxproj @@ -469,7 +469,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + 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"; showEnvVarsInLog = 0; }; E12FAB773EF2299A29253D6A /* [CP] Check Pods Manifest.lock */ = { @@ -484,7 +484,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + 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"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -656,6 +656,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Astro/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = RNP.Astro; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -679,6 +680,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Astro/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = RNP.Astro; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Astro/Networking/NetworkService.swift b/Astro/Networking/NetworkService.swift index 22107a9..78dde97 100644 --- a/Astro/Networking/NetworkService.swift +++ b/Astro/Networking/NetworkService.swift @@ -208,19 +208,19 @@ public extension NetworkServiceType { open class NetworkService: NetworkServiceType { public struct AssertionError: Error {} - fileprivate let requestManager: Alamofire.Manager + fileprivate let requestManager: Alamofire.SessionManager public convenience init() { - let requestManager: Alamofire.Manager = { + let requestManager: Alamofire.SessionManager = { let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() - configuration.HTTPAdditionalHeaders = Alamofire.Manager.defaultHTTPHeaders + configuration.HTTPAdditionalHeaders = Alamofire.SessionManager.defaultHTTPHeaders - return Alamofire.Manager(configuration: configuration) + return Alamofire.SessionManager(configuration: configuration) }() self.init(requestManager: requestManager) } - public init(requestManager: Alamofire.Manager) { + public init(requestManager: Alamofire.SessionManager) { self.requestManager = requestManager } diff --git a/Astro/Networking/NetworkServiceLogger.swift b/Astro/Networking/NetworkServiceLogger.swift index c785a6a..591f609 100644 --- a/Astro/Networking/NetworkServiceLogger.swift +++ b/Astro/Networking/NetworkServiceLogger.swift @@ -96,8 +96,8 @@ private extension NSMutableURLRequest { */ func debugDescription(headers includeHeaders: Bool = false, body includeBody: Bool = false) -> String { let method = httpMethod - let url = url?.absoluteString ?? "" - var result = "\(method) \(url)" + let absoluteUrlString = url?.absoluteString ?? "" + var result = "\(method) \(absoluteUrlString)" if includeHeaders { let headers = allHTTPHeaderFields?.map { "\($0): \($1)" } diff --git a/Astro/Networking/Route.swift b/Astro/Networking/Route.swift index 4ce16a2..bf4d769 100644 --- a/Astro/Networking/Route.swift +++ b/Astro/Networking/Route.swift @@ -21,7 +21,7 @@ public struct Route: URLRequestConvertible { public let parameters: RequestParameters? public let additionalHeaders: [String: String] - public init(URL: NSURL, method: Alamofire.Method = .GET, JSON: Freddy.JSON, additionalHeaders: [String: String] = [:]) { + public init(URL: NSURL, method: Alamofire.Method = .get, JSON: Freddy.JSON, additionalHeaders: [String: String] = [:]) { self.init(URL: URL, method: method, parameters: RequestParameters.JSON(parameters: JSON), additionalHeaders: additionalHeaders) } diff --git a/Astro/UI/NibLoadableView.swift b/Astro/UI/NibLoadableView.swift index 2d7a4dd..9bcc3fc 100644 --- a/Astro/UI/NibLoadableView.swift +++ b/Astro/UI/NibLoadableView.swift @@ -30,6 +30,6 @@ public protocol NibLoadableView: class { */ public extension NibLoadableView where Self: UIView { static var nibName: String { - return String(describing: Self) + return String(describing: Self.self) } } diff --git a/Podfile b/Podfile index d7e0685..360c38d 100644 --- a/Podfile +++ b/Podfile @@ -1,4 +1,4 @@ -platform :ios, '8.0' +platform :ios, '9.0' # ignore all warnings from all pods inhibit_all_warnings! @@ -10,7 +10,7 @@ target 'Astro' do pod "Astro", :path => "." pod 'Alamofire', '~> 4.0' pod 'Freddy', '~> 3.0' - pod 'SwiftTask' + pod 'SwiftTask', :git => 'https://github.com/ReactKit/SwiftTask', :branch => 'swift/3.0' target 'AstroTests' do inherit! :search_paths diff --git a/Podfile.lock b/Podfile.lock index d4a9644..41acc67 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,49 +1,57 @@ PODS: - - Alamofire (3.5.0) - - Astro (1.1.0): - - Astro/Logging (= 1.1.0) - - Astro/Networking (= 1.1.0) - - Astro/Security (= 1.1.0) - - Astro/UI (= 1.1.0) - - Astro/Utils (= 1.1.0) - - Astro/Logging (1.1.0) - - Astro/Networking (1.1.0): - - Alamofire (~> 3.3) + - Alamofire (4.0.0) + - Astro (2.0.0): + - Astro/Logging (= 2.0.0) + - Astro/Networking (= 2.0.0) + - Astro/Security (= 2.0.0) + - Astro/UI (= 2.0.0) + - Astro/Utils (= 2.0.0) + - Astro/Logging (2.0.0) + - Astro/Networking (2.0.0): + - Alamofire (~> 4.0) - Astro/Logging - - Freddy (~> 2.0) - - SwiftTask (= 5.0) - - Astro/Security (1.1.0): + - Freddy (~> 3.0) + - SwiftTask (~> 5.0) + - Astro/Security (2.0.0): - Astro/Logging - - Astro/UI (1.1.0) - - Astro/Utils (1.1.0) - - Freddy (2.1.0) + - Astro/UI (2.0.0) + - Astro/Utils (2.0.0) + - Freddy (3.0.0) - Nimble (4.1.0) - Nocilla (0.11.0) - Quick (0.9.3) - SwiftTask (5.0.0) DEPENDENCIES: - - Alamofire (~> 3.5) + - Alamofire (~> 4.0) - Astro (from `.`) - - Freddy (~> 2.1) + - Freddy (~> 3.0) - Nimble (~> 4.1) - Nocilla (~> 0.11) - Quick (~> 0.9) - - SwiftTask (~> 5.0) + - SwiftTask (from `https://github.com/ReactKit/SwiftTask`, branch `swift/3.0`) EXTERNAL SOURCES: Astro: - :path: . + :path: "." + SwiftTask: + :branch: swift/3.0 + :git: https://github.com/ReactKit/SwiftTask + +CHECKOUT OPTIONS: + SwiftTask: + :commit: fb4af8a4e853eb62f0418f870cfb9ae1cf618961 + :git: https://github.com/ReactKit/SwiftTask SPEC CHECKSUMS: - Alamofire: b70a7352335f8ea5babd0a923eb7e8eacc67b877 - Astro: b02e8db13f5ed43a6a8e52fc5b994d5647f9f434 - Freddy: bbdca013977db29638b24baf6572ce94452bec29 + Alamofire: fef59f00388f267e52d9b432aa5d93dc97190f14 + Astro: 4cd8e4a684989a0506e48e548fea2c452476091e + Freddy: 367f994c88a90dd3987293b4b1bec94a4530745a Nimble: 97a0a4cae5124c117115634b2d055d8c97d0af19 Nocilla: 7af7a386071150cc8aa5da4da97d060f049dd61c Quick: 13a2a2b19a5d8e3ed4fd0c36ee46597fd77ebf71 SwiftTask: 7fcd92f8ac16876e82c0e4ced0cea7e028456b6b -PODFILE CHECKSUM: bf8bba49840cacfd0f5a3521a329338860c29863 +PODFILE CHECKSUM: f28a2792f198f6b40c60f63e6c4b93ce9b6ecab8 -COCOAPODS: 1.0.1 +COCOAPODS: 1.1.0.rc.2 diff --git a/Pods/Alamofire/README.md b/Pods/Alamofire/README.md index e72f038..38dad28 100644 --- a/Pods/Alamofire/README.md +++ b/Pods/Alamofire/README.md @@ -8,35 +8,60 @@ Alamofire is an HTTP networking library written in Swift. +- [Features](#features) +- [Component Libraries](#component-libraries) +- [Requirements](#requirements) +- [Migration Guides](#migration-guides) +- [Communication](#communication) +- [Installation](#installation) +- [Usage](#usage) + - **Intro -** [Making a Request](#making-a-request), [Response Handling](#response-handling), [Response Validation](#response-validation), [Response Caching](#response-caching) + - **HTTP -** [HTTP Methods](#http-methods), [Parameter Encoding](#parameter-encoding), [HTTP Headers](#http-headers), [Authentication](#authentication) + - **Large Data -** [Downloading Data to a File](#downloading-data-to-a-file), [Uploading Data to a Server](#uploading-data-to-a-server) + - **Tools -** [Statistical Metrics](#statistical-metrics), [cURL Command Output](#curl-command-output) +- [Advanced Usage](#advanced-usage) + - **URL Session -** [Session Manager](#session-manager), [Session Delegate](#session-delegate), [Request](#request) + - **Routing -** [Routing Requests](#routing-requests), [Adapting and Retrying Requests](#adapting-and-retrying-requests) + - **Model Objects -** [Custom Response Serialization](#custom-response-serialization) + - **Connection -** [Security](#security), [Network Reachability](#network-reachability) +- [Open Radars](#open-radars) +- [FAQ](#faq) +- [Credits](#credits) +- [Donations](#donations) +- [License](#license) + ## Features -- [x] Chainable Request / Response methods +- [x] Chainable Request / Response Methods - [x] URL / JSON / plist Parameter Encoding - [x] Upload File / Data / Stream / MultipartFormData -- [x] Download using Request or Resume data -- [x] Authentication with NSURLCredential +- [x] Download File using Request or Resume Data +- [x] Authentication with URLCredential - [x] HTTP Response Validation +- [x] Upload and Download Progress Closures with Progress +- [x] cURL Command Output +- [x] Dynamically Adapt and Retry Requests - [x] TLS Certificate and Public Key Pinning -- [x] Progress Closure & NSProgress -- [x] cURL Debug Output -- [x] Comprehensive Unit Test Coverage +- [x] Network Reachability +- [x] Comprehensive Unit and Integration Test Coverage - [x] [Complete Documentation](http://cocoadocs.org/docsets/Alamofire) ## Component Libraries In order to keep Alamofire focused specifically on core networking implementations, additional component libraries have been created by the [Alamofire Software Foundation](https://github.com/Alamofire/Foundation) to bring additional functionality to the Alamofire ecosystem. -* [AlamofireImage](https://github.com/Alamofire/AlamofireImage) - An image library including image response serializers, `UIImage` and `UIImageView` extensions, custom image filters, an auto-purging in-memory cache and a priority-based image downloading system. -* [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator) - Controls the visibility of the network activity indicator on iOS using Alamofire. It contains configurable delay timers to help mitigate flicker and can support `NSURLSession` instances not managed by Alamofire. +- [AlamofireImage](https://github.com/Alamofire/AlamofireImage) - An image library including image response serializers, `UIImage` and `UIImageView` extensions, custom image filters, an auto-purging in-memory cache and a priority-based image downloading system. +- [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator) - Controls the visibility of the network activity indicator on iOS using Alamofire. It contains configurable delay timers to help mitigate flicker and can support `URLSession` instances not managed by Alamofire. ## Requirements -- iOS 8.0+ / Mac OS X 10.9+ / tvOS 9.0+ / watchOS 2.0+ +- iOS 9.0+ / Mac OS X 10.11+ / tvOS 9.0+ / watchOS 2.0+ - Xcode 8.0+ -- Swift 2.2 or 2.3 +- Swift 3.0+ ## Migration Guides +- [Alamofire 4.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%204.0%20Migration%20Guide.md) - [Alamofire 3.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%203.0%20Migration%20Guide.md) - [Alamofire 2.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%202.0%20Migration%20Guide.md) @@ -50,10 +75,6 @@ In order to keep Alamofire focused specifically on core networking implementatio ## Installation -> **Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks (10.9).** -> -> Alamofire is no longer supported on iOS 7 due to the lack of support for frameworks. Without frameworks, running Travis-CI against iOS 7 would require a second duplicated test target. The separate test suite would need to import all the Swift files and the tests would need to be duplicated and re-written. This split would be too difficult to maintain to ensure the highest possible quality of the Alamofire ecosystem. - ### CocoaPods [CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: @@ -62,7 +83,7 @@ In order to keep Alamofire focused specifically on core networking implementatio $ gem install cocoapods ``` -> CocoaPods 0.39.0+ is required to build Alamofire 3.0.0+. +> CocoaPods 1.1.0+ is required to build Alamofire 4.0.0+. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`: @@ -72,7 +93,7 @@ platform :ios, '10.0' use_frameworks! target '' do - pod 'Alamofire', '~> 3.5' + pod 'Alamofire', '~> 4.0' end ``` @@ -96,7 +117,7 @@ $ brew install carthage To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`: ```ogdl -github "Alamofire/Alamofire" ~> 3.5 +github "Alamofire/Alamofire" ~> 4.0 ``` Run `carthage update` to build the framework and drag the built `Alamofire.framework` into your Xcode project. @@ -129,11 +150,11 @@ $ git submodule add https://github.com/Alamofire/Alamofire.git - Click on the `+` button under the "Embedded Binaries" section. - You will see two different `Alamofire.xcodeproj` folders each with two different versions of the `Alamofire.framework` nested inside a `Products` folder. - > It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`. - + > It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`. + - Select the top `Alamofire.framework` for iOS and the bottom one for OS X. - > You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as either `Alamofire iOS` or `Alamofire OSX`. + > You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as either `Alamofire iOS`, `Alamofire macOS`, `Alamofire tvOS` or `Alamofire watchOS`. - And that's it! @@ -148,167 +169,260 @@ $ git submodule add https://github.com/Alamofire/Alamofire.git ```swift import Alamofire -Alamofire.request(.GET, "https://httpbin.org/get") +Alamofire.request("https://httpbin.org/get") ``` ### Response Handling -```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .responseJSON { response in - print(response.request) // original URL request - print(response.response) // URL response - print(response.data) // server data - print(response.result) // result of response serialization +Handling the `Response` of a `Request` made in Alamofire involves chaining a response handler onto the `Request`. - if let JSON = response.result.value { - print("JSON: \(JSON)") - } - } +```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 + + if let JSON = response.result.value { + print("JSON: \(JSON)") + } +} ``` +In the above example, the `responseJSON` handler is appended to the `Request` to be executed once the `Request` is complete. Rather than blocking execution to wait for a response from the server, a [callback](http://en.wikipedia.org/wiki/Callback_%28computer_programming%29) in the form of a closure is specified to handle the response once it's received. The result of a request is only available inside the scope of a response closure. Any execution contingent on the response or data received from the server must be done within a response closure. + > Networking in Alamofire is done _asynchronously_. Asynchronous programming may be a source of frustration to programmers unfamiliar with the concept, but there are [very good reasons](https://developer.apple.com/library/ios/qa/qa1693/_index.html) for doing it this way. -> Rather than blocking execution to wait for a response from the server, a [callback](http://en.wikipedia.org/wiki/Callback_%28computer_programming%29) is specified to handle the response once it's received. The result of a request is only available inside the scope of a response handler. Any execution contingent on the response or data received from the server must be done within a handler. +Alamofire contains five different response handlers by default including: -### Validation +```swift +// Response Handler - Unserialized Response +func response( + queue: DispatchQueue?, + completionHandler: @escaping (DefaultDownloadResponse) -> Void) + -> Self + +// Response Data Handler - Serialized into Data +func responseData( + queue: DispatchQueue?, + completionHandler: @escaping (DataResponse) -> Void) + -> Self + +// Response String Handler - Serialized into String +func responseString( + queue: DispatchQueue?, + encoding: String.Encoding?, + completionHandler: @escaping (DataResponse) -> Void) + -> Self + +// Response JSON Handler - Serialized into Any +func responseJSON( + queue: DispatchQueue?, + completionHandler: @escaping (DataResponse) -> Void) + -> Self + +// Response PropertyList (plist) Handler - Serialized into Any +func responsePropertyList( + queue: DispatchQueue?, + completionHandler: @escaping (DataResponse) -> Void)) + -> Self +``` + +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. -By default, Alamofire treats any completed request to be successful, regardless of the content of the response. Calling `validate` before a response handler causes an error to be generated if the response had an unacceptable status code or MIME type. +#### Response Handler -#### Manual Validation +The `response` handler does NOT evaluate any of the response data. It merely forwards on all information directly from the URL session delegate. It is the Alamofire equivalent of using `cURL` to execute a `Request`. ```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .validate(statusCode: 200..<300) - .validate(contentType: ["application/json"]) - .response { response in - print(response) - } +Alamofire.request("https://httpbin.org/get").response { response in + print("Request: \(response.request)") + print("Response: \(response.response)") + print("Error: \(response.data)") + + if let data = data, let utf8Text = String(data: data, encoding: .utf8) { + print("Data: \(utf8Text)") + } +} ``` -#### Automatic Validation +> We strongly encourage you to leverage the other response serializers taking advantage of `Response` and `Result` types. -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. +#### Response Data Handler + +The `responseData` handler uses the `responseDataSerializer` (the object that serializes the server data into some other type) to extract the `Data` returned by the server. If no errors occur and `Data` is returned, the response `Result` will be a `.success` and the `value` will be of type `Data`. ```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .validate() - .responseJSON { response in - switch response.result { - case .Success: - print("Validation Successful") - case .Failure(let error): - print(error) - } - } +Alamofire.request("https://httpbin.org/get").responseData { response in + debugPrint("All Response Info: \(response)") + + if let data = response.result.value, let utf8Text = String(data: data, encoding: .utf8) { + print("Data: \(utf8Text)") + } +} ``` -### Response Serialization +#### Response String Handler -**Built-in Response Methods** +The `responseString` handler uses the `responseStringSerializer` to convert the `Data` returned by the server into a `String` with the specified encoding. If no errors occur and the server data is successfully serialized into a `String`, the response `Result` will be a `.success` and the `value` will be of type `String`. -- `response()` -- `responseData()` -- `responseString(encoding: NSStringEncoding)` -- `responseJSON(options: NSJSONReadingOptions)` -- `responsePropertyList(options: NSPropertyListReadOptions)` +```swift +Alamofire.request("https://httpbin.org/get").responseString { response in + print("Success: \(response.result.isSuccess)") + print("Response String: \(response.result.value)") +} +``` -#### Response Handler +> If no encoding is specified, Alamofire will use the text encoding specified in the `HTTPURLResponse` from the server. If the text encoding cannot be determined by the server response, it defaults to `.isoLatin1`. + +#### Response JSON Handler + +The `responseJSON` handler uses the `responseJSONSerializer` to convert the `Data` returned by the server into an `Any` type using the specified `JSONSerialization.ReadingOptions`. If no errors occur and the server data is successfully serialized into a JSON object, the response `Result` will be a `.success` and the `value` will be of type `Any`. ```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .validate() - .response { request, response, data, error in - print(request) - print(response) - print(data) - print(error) - } +Alamofire.request("https://httpbin.org/get").responseJSON { response in + debugPrint(response) + + if let json = response.result.value { + print("JSON: \(json)") + } +} ``` -> The `response` serializer does NOT evaluate any of the response data. It merely forwards on all the information directly from the URL session delegate. We strongly encourage you to leverage the other response serializers taking advantage of `Response` and `Result` types. +> All JSON serialization is handled by the `JSONSerialization` API in the `Foundation` framework. -#### Response Data Handler +#### Chained Response Handlers + +Response handlers can even be chained: ```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .validate() - .responseData { response in - print(response.request) - print(response.response) - print(response.result) - } +Alamofire.request("https://httpbin.org/get") + .responseString { response in + print("Response String: \(response.result.value)") + } + .responseJSON { response in + print("Response JSON: \(response.result.value)") + } ``` -#### Response String Handler +> It is important to note that using multiple response handlers on the same `Request` requires the server data to be serialized multiple times. Once for each response handler. + +#### Response Handler Queue + +Reponse handlers by default are executed on the main dispatch queue. However, a custom dispatch queue can be provided instead. ```swift -Alamofire.request(.GET, "https://httpbin.org/get") - .validate() - .responseString { response in - print("Success: \(response.result.isSuccess)") - print("Response String: \(response.result.value)") - } +let utilityQueue = DispatchQueue.global(qos: .utility) + +Alamofire.request("https://httpbin.org/get").responseJSON(queue: utilityQueue) { response in + print("Executing response handler on utility queue") +} ``` -#### Response JSON Handler +### Response Validation + +By default, Alamofire treats any completed request to be successful, regardless of the content of the response. Calling `validate` before a response handler causes an error to be generated if the response had an unacceptable status code or MIME type. + +#### Manual Validation ```swift -Alamofire.request(.GET, "https://httpbin.org/get") - .validate() - .responseJSON { response in - debugPrint(response) - } +Alamofire.request("https://httpbin.org/get") + .validate(statusCode: 200..<300) + .validate(contentType: ["application/json"]) + .response { response in + switch response.result { + case .success: + print("Validation Successful") + case .failure(let error): + print(error) + } + } ``` -#### Chained Response Handlers +#### Automatic Validation -Response handlers can even be chained: +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. ```swift -Alamofire.request(.GET, "https://httpbin.org/get") - .validate() - .responseString { response in - print("Response String: \(response.result.value)") - } - .responseJSON { response in - print("Response JSON: \(response.result.value)") - } +Alamofire.request("https://httpbin.org/get").validate().responseJSON { response in + switch response.result { + case .success: + print("Validation Successful") + case .failure(let error): + print(error) + } +} ``` +### Response Caching + +Response Caching is handled on the system framework level by [`URLCache`](https://developer.apple.com/reference/foundation/urlcache). It provides a composite in-memory and on-disk cache and lets you manipulate the sizes of both the in-memory and on-disk portions. + +> By default, Alamofire leverages the shared `URLCache`. In order to customize it, see the [Session Manager Configurations](#session-manager-configurations) section. + ### HTTP Methods -`Alamofire.Method` lists the HTTP methods defined in [RFC 7231 §4.3](http://tools.ietf.org/html/rfc7231#section-4.3): +The `HTTPMethod` enumeration lists the HTTP methods defined in [RFC 7231 §4.3](http://tools.ietf.org/html/rfc7231#section-4.3): ```swift -public enum Method: String { - case OPTIONS, GET, HEAD, POST, PUT, PATCH, DELETE, TRACE, CONNECT +public enum HTTPMethod: String { + case options = "OPTIONS" + case get = "GET" + case head = "HEAD" + case post = "POST" + case put = "PUT" + case patch = "PATCH" + case delete = "DELETE" + case trace = "TRACE" + case connect = "CONNECT" } ``` -These values can be passed as the first argument of the `Alamofire.request` method: +These values can be passed as the `method` argument to the `Alamofire.request` API: ```swift -Alamofire.request(.POST, "https://httpbin.org/post") +Alamofire.request("https://httpbin.org/get") // method defaults to `.get` -Alamofire.request(.PUT, "https://httpbin.org/put") - -Alamofire.request(.DELETE, "https://httpbin.org/delete") +Alamofire.request("https://httpbin.org/post", method: .post) +Alamofire.request("https://httpbin.org/put", method: .put) +Alamofire.request("https://httpbin.org/delete", method: .delete) ``` -### Parameters +> The `Alamofire.request` method parameter defaults to `.get`. + +### Parameter Encoding + +Alamofire supports three types of parameter encoding including: `URL`, `JSON` and `PropertyList`. It can also support any custom encoding that conforms to the `ParameterEncoding` protocol. + +#### URL Encoding + +The `URLEncoding` type creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP body of the URL request. Whether the query string is set or appended to any existing URL query string or set as the HTTP body depends on the `Destination` of the encoding. The `Destination` enumeration has three cases: + +- `.methodDependent` - Applies encoded query string result to existing query string for `GET`, `HEAD` and `DELETE` requests and sets as the HTTP body for requests with any other HTTP method. +- `.queryString` - Sets or appends encoded query string result to existing query string. +- `.httpBody` - Sets encoded query string result as the HTTP body of the URL request. -#### GET Request With URL-Encoded Parameters +The `Content-Type` HTTP header field of an encoded request with HTTP body is set to `application/x-www-form-urlencoded; charset=utf-8`. Since there is no published specification for how to encode collection types, the convention of appending `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for nested dictionary values (`foo[bar]=baz`). + +##### GET Request With URL-Encoded Parameters ```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) +let parameters: Parameters = ["foo": "bar"] + +// All three of these calls are equivalent +Alamofire.request("https://httpbin.org/get", parameters: parameters) // encoding defaults to `URLEncoding.default` +Alamofire.request("https://httpbin.org/get", parameters: parameters, encoding: URLEncoding.default) +Alamofire.request("https://httpbin.org/get", parameters: parameters, encoding: URLEncoding(destination: .methodDependent)) + // https://httpbin.org/get?foo=bar ``` -#### POST Request With URL-Encoded Parameters +##### POST Request With URL-Encoded Parameters ```swift -let parameters = [ +let parameters: Parameters = [ "foo": "bar", "baz": ["a", 1], "qux": [ @@ -318,294 +432,358 @@ let parameters = [ ] ] -Alamofire.request(.POST, "https://httpbin.org/post", parameters: parameters) +// All three of these calls are equivalent +Alamofire.request("https://httpbin.org/post", parameters: parameters) +Alamofire.request("https://httpbin.org/post", parameters: parameters, encoding: URLEncoding.default) +Alamofire.request("https://httpbin.org/post", parameters: parameters, encoding: URLEncoding.httpBody) + // HTTP body: foo=bar&baz[]=a&baz[]=1&qux[x]=1&qux[y]=2&qux[z]=3 ``` -### Parameter Encoding +#### JSON Encoding + +The `JSONEncoding` type creates a JSON representation of the parameters object, which is set as the HTTP body of the request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`. -Parameters can also be encoded as JSON, Property List, or any custom format, using the `ParameterEncoding` enum: +##### POST Request with JSON-Encoded Parameters ```swift -enum ParameterEncoding { - case URL - case URLEncodedInURL - case JSON - case PropertyList(format: NSPropertyListFormat, options: NSPropertyListWriteOptions) - case Custom((URLRequestConvertible, [String: AnyObject]?) -> (NSMutableURLRequest, NSError?)) +let parameters: Parameters = [ + "foo": [1,2,3], + "bar": [ + "baz": "qux" + ] +] - func encode(request: NSURLRequest, parameters: [String: AnyObject]?) -> (NSURLRequest, NSError?) - { ... } -} +// Both calls are equivalent +Alamofire.request("https://httpbin.org/post", method: .post, parameters: parameters, encoding: JSONEncoding.default) +Alamofire.request("https://httpbin.org/post", method: .post, parameters: parameters, encoding: JSONEncoding(options: [])) + +// HTTP body: {"foo": [1, 2, 3], "bar": {"baz": "qux"}} ``` -- `URL`: A query string to be set as or appended to any existing URL query for `GET`, `HEAD`, and `DELETE` requests, or set as the body for requests with any other HTTP method. The `Content-Type` HTTP header field of an encoded request with HTTP body is set to `application/x-www-form-urlencoded`. _Since there is no published specification for how to encode collection types, Alamofire follows the convention of appending `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for nested dictionary values (`foo[bar]=baz`)._ -- `URLEncodedInURL`: Creates query string to be set as or appended to any existing URL query. Uses the same implementation as the `.URL` case, but always applies the encoded result to the URL. -- `JSON`: Uses `NSJSONSerialization` to create a JSON representation of the parameters object, which is set as the body of the request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`. -- `PropertyList`: Uses `NSPropertyListSerialization` to create a plist representation of the parameters object, according to the associated format and write options values, which is set as the body of the request. The `Content-Type` HTTP header field of an encoded request is set to `application/x-plist`. -- `Custom`: Uses the associated closure value to construct a new request given an existing request and parameters. +#### Property List Encoding + +The `PropertyListEncoding` uses `PropertyListSerialization` to create a plist representation of the parameters object, according to the associated format and write options values, which is set as the body of the request. The `Content-Type` HTTP header field of an encoded request is set to `application/x-plist`. + +#### Custom Encoding -#### Manual Parameter Encoding of an NSURLRequest +In the event that the provided `ParameterEncoding` types do not meet your needs, you can create your own custom encoding. Here's a quick example of how you could build a custom `JSONStringArrayEncoding` type to encode a JSON string array onto a `Request`. ```swift -let URL = NSURL(string: "https://httpbin.org/get")! -var request = NSMutableURLRequest(URL: URL) +struct JSONStringArrayEncoding: ParameterEncoding { + private let array: [String] -let parameters = ["foo": "bar"] -let encoding = Alamofire.ParameterEncoding.URL -(request, _) = encoding.encode(request, parameters: parameters) + init(array: [String]) { + self.array = array + } + + func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { + var urlRequest = urlRequest.urlRequest + + let data = try JSONSerialization.data(withJSONObject: array, options: []) + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = data + + return urlRequest + } +} ``` -#### POST Request with JSON-encoded Parameters +#### Manual Parameter Encoding of a URLRequest + +The `ParameterEncoding` APIs can be used outside of making network requests. ```swift -let parameters = [ - "foo": [1,2,3], - "bar": [ - "baz": "qux" - ] -] +let url = URL(string: "https://httpbin.org/get")! +var urlRequest = URLRequest(url: url) -Alamofire.request(.POST, "https://httpbin.org/post", parameters: parameters, encoding: .JSON) -// HTTP body: {"foo": [1, 2, 3], "bar": {"baz": "qux"}} +let parameters: Parameters = ["foo": "bar"] +let encodedURLRequest = try URLEncoding.queryString.encode(urlRequest, with: parameters) ``` ### HTTP Headers Adding a custom HTTP header to a `Request` is supported directly in the global `request` method. This makes it easy to attach HTTP headers to a `Request` that can be constantly changing. -> For HTTP headers that do not change, it is recommended to set them on the `NSURLSessionConfiguration` so they are automatically applied to any `NSURLSessionTask` created by the underlying `NSURLSession`. - ```swift -let headers = [ +let headers: HTTPHeaders = [ "Authorization": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==", "Accept": "application/json" ] -Alamofire.request(.GET, "https://httpbin.org/get", headers: headers) - .responseJSON { response in - debugPrint(response) - } +Alamofire.request("https://httpbin.org/headers", headers: headers).responseJSON { response in + debugPrint(response) +} ``` -The default Alamofire `Manager` provides a common set of headers for every request. These include: +> For HTTP headers that do not change, it is recommended to set them on the `URLSessionConfiguration` so they are automatically applied to any `URLSessionTask` created by the underlying `URLSession`. For more information, see the [Session Manager Configurations](#session-manager-configurations) section. -* `Accept-Encoding`, which defaults to `gzip;q=1.0, compress;q=0.5`, per [RFC7230](https://tools.ietf.org/html/rfc7230#section-4.2.3). -* `Accept-Language`, which defaults to up to the top 6 preferred languages on the system, formatted like `en;q=1.0`, per [RFC7231](https://tools.ietf.org/html/rfc7231#section-5.3.5). -* `User-Agent`, which contains versioning information about the current app. For example: `iOS Example/1.0 (com.alamofire.iOS-Example; build:1; iOS 9.3.0) Alamofire/3.4.2`, per [RFC7231](https://tools.ietf.org/html/rfc7231#section-5.5.3). +The default Alamofire `SessionManager` provides a default set of headers for every `Request`. These include: -Customizing these headers, since they need to be added to every request, should be done by creating a customized `Manager` instance and modifying the `defaultHTTPHeaders` dictionary, as shown in the [Modifying Session Configuration](#modifying-session-configuration) section. +- `Accept-Encoding`, which defaults to `gzip;q=1.0, compress;q=0.5`, per [RFC 7230 §4.2.3](https://tools.ietf.org/html/rfc7230#section-4.2.3). +- `Accept-Language`, which defaults to up to the top 6 preferred languages on the system, formatted like `en;q=1.0`, per [RFC 7231 §5.3.5](https://tools.ietf.org/html/rfc7231#section-5.3.5). +- `User-Agent`, which contains versioning information about the current app. For example: `iOS Example/1.0 (com.alamofire.iOS-Example; build:1; iOS 10.0.0) Alamofire/4.0.0`, per [RFC 7231 §5.5.3](https://tools.ietf.org/html/rfc7231#section-5.5.3). -### Caching +If you need to customize these headers, a custom `URLSessionManagerConfiguration` should be created, the `defaultHTTPHeaders` property updated and the configuration applied to a new `SessionManager` instance. -Caching is handled on the system framework level by [`NSURLCache`](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLCache_Class/Reference/Reference.html#//apple_ref/occ/cl/NSURLCache). +### Authentication -### Uploading +Authentication is handled on the system framework level by [`URLCredential`](https://developer.apple.com/reference/foundation/nsurlcredential) and [`URLAuthenticationChallenge`](https://developer.apple.com/reference/foundation/urlauthenticationchallenge). -**Supported Upload Types** +**Supported Authentication Schemes** -- File -- Data -- Stream -- MultipartFormData +- [HTTP Basic](http://en.wikipedia.org/wiki/Basic_access_authentication) +- [HTTP Digest](http://en.wikipedia.org/wiki/Digest_access_authentication) +- [Kerberos](http://en.wikipedia.org/wiki/Kerberos_%28protocol%29) +- [NTLM](http://en.wikipedia.org/wiki/NT_LAN_Manager) -#### Uploading a File +#### HTTP Basic Authentication + +The `authenticate` method on a `Request` will automatically provide a `URLCredential` to a `URLAuthenticationChallenge` when appropriate: ```swift -let fileURL = NSBundle.mainBundle().URLForResource("Default", withExtension: "png") -Alamofire.upload(.POST, "https://httpbin.org/post", file: fileURL) +let user = "user" +let password = "password" + +Alamofire.request("https://httpbin.org/basic-auth/\(user)/\(password)") + .authenticate(user: user, password: password) + .responseJSON { response in + debugPrint(response) + } ``` -#### Uploading with Progress +Depending upon your server implementation, an `Authorization` header may also be appropriate: ```swift -Alamofire.upload(.POST, "https://httpbin.org/post", file: fileURL) - .progress { bytesWritten, totalBytesWritten, totalBytesExpectedToWrite in - print(totalBytesWritten) +let user = "user" +let password = "password" - // This closure is NOT called on the main queue for performance - // reasons. To update your ui, dispatch to the main queue. - dispatch_async(dispatch_get_main_queue()) { - print("Total bytes written on main queue: \(totalBytesWritten)") - } - } - .validate() - .responseJSON { response in - debugPrint(response) - } +var headers: HTTPHeaders = [:] + +if let authorizationHeader = Request.authorizationHeader(user: user, password: password) { + headers[authorizationHeader.key] = authorizationHeader.value +} + +Alamofire.request("https://httpbin.org/basic-auth/user/password", headers: headers) + .responseJSON { response in + debugPrint(response) + } ``` -#### Uploading MultipartFormData +#### Authentication with URLCredential ```swift -Alamofire.upload( - .POST, - "https://httpbin.org/post", - multipartFormData: { multipartFormData in - multipartFormData.appendBodyPart(fileURL: unicornImageURL, name: "unicorn") - multipartFormData.appendBodyPart(fileURL: rainbowImageURL, name: "rainbow") - }, - encodingCompletion: { encodingResult in - switch encodingResult { - case .Success(let upload, _, _): - upload.responseJSON { response in - debugPrint(response) - } - case .Failure(let encodingError): - print(encodingError) - } +let user = "user" +let password = "password" + +let credential = URLCredential(user: user, password: password, persistence: .forSession) + +Alamofire.request("https://httpbin.org/basic-auth/\(user)/\(password)") + .authenticate(usingCredential: credential) + .responseJSON { response in + debugPrint(response) } -) ``` -### Downloading +> It is important to note that when using a `URLCredential` for authentication, the underlying `URLSession` will actually end up making two requests if a challenge is issued by the server. The first request will not include the credential which "may" trigger a challenge from the server. The challenge is then received by Alamofire, the credential is appended and the request is retried by the underlying `URLSession`. -**Supported Download Types** +### Downloading Data to a File -- Request -- Resume Data +Requests made in Alamofire that fetch data from a server can download the data in-memory or on-disk. The `Alamofire.request` APIs used in all the examples so far always downloads the server data in-memory. This is great for smaller payloads because it's more efficient, but really bad for larger payloads because the download could run your entire application out-of-memory. Because of this, you can also use the `Alamofire.download` APIs to download the server data to a temporary file on-disk. -#### Downloading a File +```swift +Alamofire.download("https://httpbin.org/image/png").responseData { response in + if let data = response.result.value { + let image = UIImage(data: data) + } +} +``` + +> The `Alamofire.download` APIs should also be used if you need to download data while your app is in the background. For more information, please see the [Session Manager Configurations](#session-manager-configurations) section. + +#### Download File Destination + +You can also provide a `DownloadFileDestination` closure to move the file from the temporary directory to a final destination. Before the temporary file is actually moved to the `destinationURL`, the `DownloadOptions` specified in the closure will be executed. The two currently supported `DownloadOptions` are: + +- `.createIntermediateDirectories` - Creates intermediate directories for the destination URL if specified. +- `.removePreviousFile` - Removes a previous file from the destination URL if specified. ```swift -Alamofire.download(.GET, "https://httpbin.org/stream/100") { temporaryURL, response in - let fileManager = NSFileManager.defaultManager() - let directoryURL = fileManager.URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask)[0] - let pathComponent = response.suggestedFilename +let destination: DownloadRequest.DownloadFileDestination = { _, _ in + let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] + let fileURL = documentsURL.appendPathComponent("pig.png") - return directoryURL.URLByAppendingPathComponent(pathComponent!) + return (fileURL, [.removePreviousFile, .createIntermediateDirectories]) +} + +Alamofire.download(urlString, to: destination).response { response in + print(response) + + if response.result.isSuccess, let imagePath = response.destinationURL?.path { + let image = UIImage(contentsOfFile: imagePath) + } } ``` -#### Using the Default Download Destination +You can also use the suggested download destination API. ```swift -let destination = Alamofire.Request.suggestedDownloadDestination(directory: .DocumentDirectory, domain: .UserDomainMask) -Alamofire.download(.GET, "https://httpbin.org/stream/100", destination: destination) +let destination = DownloadRequest.suggestedDownloadDestination(directory: .documentDirectory) +Alamofire.download("https://httpbin.org/image/png", to: destination) ``` -#### Downloading a File w/Progress +#### Download Progress -```swift -Alamofire.download(.GET, "https://httpbin.org/stream/100", destination: destination) - .progress { bytesRead, totalBytesRead, totalBytesExpectedToRead in - print(totalBytesRead) +Many times it can be helpful to report download progress to the user. Any `DownloadRequest` can report download progress using the `downloadProgress` API. - // This closure is NOT called on the main queue for performance - // reasons. To update your ui, dispatch to the main queue. - dispatch_async(dispatch_get_main_queue()) { - print("Total bytes read on main queue: \(totalBytesRead)") - } - } - .response { _, _, _, error in - if let error = error { - print("Failed with error: \(error)") - } else { - print("Downloaded file successfully") - } - } +```swift +Alamofire.download("https://httpbin.org/image/png") + .downloadProgress { progress in + print("Download Progress: \(progress.fractionCompleted)") + } + .responseData { response in + if let data = response.result.value { + let image = UIImage(data: data) + } + } ``` -#### Accessing Resume Data for Failed Downloads +The `downloadProgress` API also takes a `queue` parameter which defines which `DispatchQueue` the download progress closure should be called on. ```swift -Alamofire.download(.GET, "https://httpbin.org/stream/100", destination: destination) - .response { _, _, data, _ in - if let - data = data, - resumeDataString = NSString(data: data, encoding: NSUTF8StringEncoding) - { - print("Resume Data: \(resumeDataString)") - } else { - print("Resume Data was empty") - } - } +let utilityQueue = DispatchQueue.global(qos: .utility) + +Alamofire.download("https://httpbin.org/image/png") + .downloadProgress(queue: utilityQueue) { progress in + print("Download Progress: \(progress.fractionCompleted)") + } + .responseData { response in + if let data = response.result.value { + let image = UIImage(data: data) + } + } ``` -> The `data` parameter is automatically populated with the `resumeData` if available. +#### Resuming a Download + +If a `DownloadRequest` is cancelled or interrupted, the underlying URL session may generate resume data for the active `DownloadRequest`. If this happens, the resume data can be re-used to restart the `DownloadRequest` where it left off. The resume data can be accessed through the download response, then reused when trying to restart the request. ```swift -let download = Alamofire.download(.GET, "https://httpbin.org/stream/100", destination: destination) -download.response { _, _, _, _ in - if let - resumeData = download.resumeData, - resumeDataString = NSString(data: resumeData, encoding: NSUTF8StringEncoding) - { - print("Resume Data: \(resumeDataString)") - } else { - print("Resume Data was empty") +class ImageRequestor { + private var resumeData: Data? + private var image: UIImage? + + func fetchImage(completion: (UIImage?) -> Void) { + 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") + + return (fileURL, [.removePreviousFile, .createIntermediateDirectories]) + } + + let request: DownloadRequest + + if let resumeData = resumeData { + 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 + } + } } } ``` -### Authentication +### Uploading Data to a Server -Authentication is handled on the system framework level by [`NSURLCredential` and `NSURLAuthenticationChallenge`](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLAuthenticationChallenge_Class/Reference/Reference.html). +When sending relatively small amounts of data to a server using JSON or URL encoded parameters, the `Alamofire.request` APIs are usually sufficient. If you need to send much larger amounts of data from a file URL or an `InputStream`, then the `Alamofire.upload` APIs are what you want to use. -**Supported Authentication Schemes** +> The `Alamofire.upload` APIs should also be used if you need to upload data while your app is in the background. For more information, please see the [Session Manager Configurations](#session-manager-configurations) section. -- [HTTP Basic](http://en.wikipedia.org/wiki/Basic_access_authentication) -- [HTTP Digest](http://en.wikipedia.org/wiki/Digest_access_authentication) -- [Kerberos](http://en.wikipedia.org/wiki/Kerberos_%28protocol%29) -- [NTLM](http://en.wikipedia.org/wiki/NT_LAN_Manager) - -#### HTTP Basic Authentication - -The `authenticate` method on a `Request` will automatically provide an `NSURLCredential` to an `NSURLAuthenticationChallenge` when appropriate: +#### Uploading Data ```swift -let user = "user" -let password = "password" +let imageData = UIPNGRepresentation(image)! -Alamofire.request(.GET, "https://httpbin.org/basic-auth/\(user)/\(password)") - .authenticate(user: user, password: password) - .responseJSON { response in - debugPrint(response) - } +Alamofire.upload(imageData, to: "https://httpbin.org/post").responseJSON { response in + debugPrint(response) +} ``` -Depending upon your server implementation, an `Authorization` header may also be appropriate: +#### Uploading a File ```swift -let user = "user" -let password = "password" +let fileURL = Bundle.main.url(forResource: "video", withExtension: "mov") -let credentialData = "\(user):\(password)".dataUsingEncoding(NSUTF8StringEncoding)! -let base64Credentials = credentialData.base64EncodedStringWithOptions([]) +Alamofire.upload(fileURL, to: "https://httpbin.org/post").responseJSON { response in + debugPrint(response) +} +``` -let headers = ["Authorization": "Basic \(base64Credentials)"] +#### Uploading Multipart Form Data -Alamofire.request(.GET, "https://httpbin.org/basic-auth/user/password", headers: headers) - .responseJSON { response in - debugPrint(response) - } +```swift +Alamofire.upload( + multipartFormData: { multipartFormData in + multipartFormData.append(unicornImageURL, withName: "unicorn") + multipartFormData.append(rainbowImageURL, withName: "rainbow") + }, + to: "https://httpbin.org/post", + encodingCompletion: { encodingResult in + switch encodingResult { + case .success(let upload, _, _): + upload.responseJSON { response in + debugPrint(response) + } + case .failure(let encodingError): + print(encodingError) + } + } +) ``` -#### Authentication with NSURLCredential +#### Upload Progress -```swift -let user = "user" -let password = "password" +While your user is waiting for their upload to complete, sometimes it can be handy to show the progress of the upload to the user. Any `UploadRequest` can report both upload progress and download progress of the response data using the `uploadProgress` and `downloadProgress` APIs. -let credential = NSURLCredential(user: user, password: password, persistence: .ForSession) +```swift +let fileURL = Bundle.main.url(forResource: "video", withExtension: "mov") -Alamofire.request(.GET, "https://httpbin.org/basic-auth/\(user)/\(password)") - .authenticate(usingCredential: credential) - .responseJSON { response in - debugPrint(response) - } +Alamofire.upload(fileURL, to: "https://httpbin.org/post") + .uploadProgress { progress in // main queue by default + print("Upload Progress: \(progress.fractionCompleted)") + } + .downloadProgress { progress in // main queue by default + print("Download Progress: \(progress.fractionCompleted)") + } + .responseJSON { response in + debugPrint(response) + } ``` -### Timeline +### Statistical Metrics + +#### Timeline -Alamofire collects timings throughout the lifecycle of a `Request` and creates a `Timeline` object exposed as a property on a `Response`. +Alamofire collects timings throughout the lifecycle of a `Request` and creates a `Timeline` object exposed as a property on all response types. ```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .validate() - .responseJSON { response in - print(response.timeline) - } +Alamofire.request("https://httpbin.org/get").responseJSON { response in + print(response.timeline) +} ``` The above reports the following `Timeline` info: @@ -615,29 +793,52 @@ The above reports the following `Timeline` info: - `Serialization Duration`: 0.001 seconds - `Total Duration`: 0.429 seconds -### Printable +#### URL Session Task Metrics + +In iOS and tvOS 10 and macOS 10.12, Apple introduced the new [URLSessionTaskMetrics](https://developer.apple.com/reference/foundation/urlsessiontaskmetrics) APIs. The task metrics encapsulate some fantastic statistical information about the request and response execution. The API is very similar to the `Timeline`, but provides many more statistics that Alamofire doesn't have access to compute. The metrics can be accessed through any response type. + +```swift +Alamofire.request("https://httpbin.org/get").responseJSON { response in + print(response.metrics) +} +``` + +It's important to note that these APIs are only available on iOS and tvOS 10 and macOS 10.12. Therefore, depending on your deployment target, you may need to use these inside availability checks: + +```swift +Alamofire.request("https://httpbin.org/get").responseJSON { response in + if #available(iOS 10.0. *) { + print(response.metrics) + } +} +``` + +### cURL Command Output + +Debugging platform issues can be frustrating. Thankfully, Alamofire `Request` objects conform to both the `CustomStringConvertible` and `CustomDebugStringConvertible` protocols to provide some VERY helpful debugging tools. + +#### CustomStringConvertible ```swift -let request = Alamofire.request(.GET, "https://httpbin.org/ip") +let request = Alamofire.request("https://httpbin.org/ip") print(request) // GET https://httpbin.org/ip (200) ``` -### DebugPrintable +#### CustomDebugStringConvertible ```swift -let request = Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - +let request = Alamofire.request("https://httpbin.org/get", parameters: ["foo": "bar"]) debugPrint(request) ``` -#### Output (cURL) +Outputs: ```bash $ curl -i \ - -H "User-Agent: Alamofire" \ - -H "Accept-Encoding: Accept-Encoding: gzip;q=1.0,compress;q=0.5" \ + -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" ``` @@ -646,477 +847,706 @@ $ curl -i \ ## Advanced Usage -> Alamofire is built on `NSURLSession` and the Foundation URL Loading System. To make the most of -this framework, it is recommended that you be familiar with the concepts and capabilities of the underlying networking stack. +Alamofire is built on `URLSession` and the Foundation URL Loading System. To make the most of this framework, it is recommended that you be familiar with the concepts and capabilities of the underlying networking stack. **Recommended Reading** - [URL Loading System Programming Guide](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html) -- [NSURLSession Class Reference](https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLSession_class/Introduction/Introduction.html#//apple_ref/occ/cl/NSURLSession) -- [NSURLCache Class Reference](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLCache_Class/Reference/Reference.html#//apple_ref/occ/cl/NSURLCache) -- [NSURLAuthenticationChallenge Class Reference](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLAuthenticationChallenge_Class/Reference/Reference.html) +- [URLSession Class Reference](https://developer.apple.com/reference/foundation/nsurlsession) +- [URLCache Class Reference](https://developer.apple.com/reference/foundation/urlcache) +- [URLAuthenticationChallenge Class Reference](https://developer.apple.com/reference/foundation/urlauthenticationchallenge) -### Manager +### Session Manager -Top-level convenience methods like `Alamofire.request` use a shared instance of `Alamofire.Manager`, which is configured with the default `NSURLSessionConfiguration`. +Top-level convenience methods like `Alamofire.request` use a default instance of `Alamofire.SessionManager`, which is configured with the default `URLSessionConfiguration`. As such, the following two statements are equivalent: ```swift -Alamofire.request(.GET, "https://httpbin.org/get") +Alamofire.request("https://httpbin.org/get") ``` ```swift -let manager = Alamofire.Manager.sharedInstance -manager.request(NSURLRequest(URL: NSURL(string: "https://httpbin.org/get")!)) +let sessionManager = Alamofire.SessionManager.default +sessionManager.request("https://httpbin.org/get") ``` -Applications can create managers for background and ephemeral sessions, as well as new managers that customize the default session configuration, such as for default headers (`HTTPAdditionalHeaders`) or timeout interval (`timeoutIntervalForRequest`). +Applications can create session managers for background and ephemeral sessions, as well as new managers that customize the default session configuration, such as for default headers (`httpAdditionalHeaders`) or timeout interval (`timeoutIntervalForRequest`). -#### Creating a Manager with Default Configuration +#### Creating a Session Manager with Default Configuration ```swift -let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() -let manager = Alamofire.Manager(configuration: configuration) +let configuration = URLSessionConfiguration.default +let sessionManager = Alamofire.SessionManager(configuration: configuration) ``` -#### Creating a Manager with Background Configuration +#### Creating a Session Manager with Background Configuration ```swift -let configuration = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier("com.example.app.background") -let manager = Alamofire.Manager(configuration: configuration) +let configuration = URLSessionConfiguration.background(withIdentifier: "com.example.app.background") +let sessionManager = Alamofire.SessionManager(configuration: configuration) ``` -#### Creating a Manager with Ephemeral Configuration +#### Creating a Session Manager with Ephemeral Configuration ```swift -let configuration = NSURLSessionConfiguration.ephemeralSessionConfiguration() -let manager = Alamofire.Manager(configuration: configuration) +let configuration = URLSessionConfiguration.ephemeral +let sessionManager = Alamofire.SessionManager(configuration: configuration) ``` -#### Modifying Session Configuration +#### Modifying the Session Configuration ```swift -var defaultHeaders = Alamofire.Manager.sharedInstance.session.configuration.HTTPAdditionalHeaders ?? [:] +var defaultHeaders = Alamofire.SessionManager.default.defaultHTTPHeaders defaultHeaders["DNT"] = "1 (Do Not Track Enabled)" -let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() -configuration.HTTPAdditionalHeaders = defaultHeaders +let configuration = URLSessionConfiguration.default +configuration.httpAdditionalHeaders = defaultHeaders -let manager = Alamofire.Manager(configuration: configuration) +let sessionManager = Alamofire.SessionManager(configuration: configuration) ``` -> This is **not** recommended for `Authorization` or `Content-Type` headers. Instead, use `URLRequestConvertible` and `ParameterEncoding`, respectively. - -### Request +> This is **not** recommended for `Authorization` or `Content-Type` headers. Instead, use the `headers` parameter in the top-level `Alamofire.request` APIs, `URLRequestConvertible` and `ParameterEncoding`, respectively. -The result of a `request`, `upload`, or `download` method is an instance of `Alamofire.Request`. A request is always created using a constructor method from an owning manager, and never initialized directly. +### Session Delegate -Methods like `authenticate`, `validate` and `responseData` return the caller in order to facilitate chaining. +By default, an Alamofire `SessionManager` instance creates a `SessionDelegate` object to handle all the various types of delegate callbacks that are generated by the underlying `URLSession`. The implementations of each delegate method handle the most common use cases for these types of calls abstracting the complexity away from the top-level APIs. However, advanced users may find the need to override the default functionality for various reasons. -Requests can be suspended, resumed, and cancelled: +#### Override Closures -- `suspend()`: Suspends the underlying task and dispatch queue -- `resume()`: Resumes the underlying task and dispatch queue. If the owning manager does not have `startRequestsImmediately` set to `true`, the request must call `resume()` in order to start. -- `cancel()`: Cancels the underlying task, producing an error that is passed to any registered response handlers. +The first way to customize the `SessionDelegate` behavior is through the use of the override closures. Each closure gives you the ability to override the implementation of the matching `SessionDelegate` API, yet still use the default implementation for all other APIs. This makes it easy to customize subsets of the delegate functionality. Here are a few examples of some of the override closures available: -### Response Serialization +```swift +/// Overrides default behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)`. +open var sessionDidReceiveChallenge: ((URLSession, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? -#### Handling Errors +/// Overrides default behavior for URLSessionDelegate method `urlSessionDidFinishEvents(forBackgroundURLSession:)`. +open var sessionDidFinishEventsForBackgroundURLSession: ((URLSession) -> Void)? -Before implementing custom response serializers or object serialization methods, it's important to be prepared to handle any errors that may occur. Alamofire recommends handling these through the use of either your own `NSError` creation methods, or a simple `enum` that conforms to `ErrorType`. For example, this `BackendError` type, which will be used in later examples: +/// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)`. +open var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)? -```swift -public enum BackendError: ErrorType { - case Network(error: NSError) - case DataSerialization(reason: String) - case JSONSerialization(error: NSError) - case ObjectSerialization(reason: String) - case XMLSerialization(error: NSError) -} +/// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)`. +open var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)? ``` -#### Creating a Custom Response Serializer - -Alamofire provides built-in response serialization for strings, JSON, and property lists, but others can be added in extensions on `Alamofire.Request`. - -For example, here's how a response handler using [Ono](https://github.com/mattt/Ono) might be implemented: +The following is a short example of how to use the `taskWillPerformHTTPRedirection` to avoid following redirects to any `apple.com` domains. ```swift -extension Request { - public static func XMLResponseSerializer() -> ResponseSerializer { - return ResponseSerializer { request, response, data, error in - guard error == nil else { return .Failure(.Network(error: error!)) } +let sessionManager = Alamofire.SessionManager(configuration: URLSessionConfiguration.default) +let delegate: Alamofire.SessionDelegate = sessionManager.delegate - guard let validData = data else { - return .Failure(.DataSerialization(reason: "Data could not be serialized. Input data was nil.")) - } +delegate.taskWillPerformHTTPRedirection = { session, task, response, request in + var finalRequest = request - do { - let XML = try ONOXMLDocument(data: validData) - return .Success(XML) - } catch { - return .Failure(.XMLSerialization(error: error as NSError)) - } - } + if + let originalRequest = task.originalRequest, + let urlString = originalRequest.url?.urlString, + urlString.contains("apple.com") + { + finalRequest = originalRequest } - public func responseXMLDocument(completionHandler: Response -> Void) -> Self { - return response(responseSerializer: Request.XMLResponseSerializer(), completionHandler: completionHandler) - } + return finalRequest } ``` -#### Generic Response Object Serialization - -Generics can be used to provide automatic, type-safe response object serialization. - -```swift -public protocol ResponseObjectSerializable { - init?(response: NSHTTPURLResponse, representation: AnyObject) -} - -extension Request { - public func responseObject(completionHandler: Response -> Void) -> Self { - let responseSerializer = ResponseSerializer { request, response, data, error in - guard error == nil else { return .Failure(.Network(error: error!)) } - - let JSONResponseSerializer = Request.JSONResponseSerializer(options: .AllowFragments) - let result = JSONResponseSerializer.serializeResponse(request, response, data, error) - - switch result { - case .Success(let value): - if let - response = response, - responseObject = T(response: response, representation: value) - { - return .Success(responseObject) - } else { - return .Failure(.ObjectSerialization(reason: "JSON could not be serialized into response object: \(value)")) - } - case .Failure(let error): - return .Failure(.JSONSerialization(error: error)) - } - } +#### Subclassing - return response(responseSerializer: responseSerializer, completionHandler: completionHandler) - } -} -``` +Another way to override the default implementation of the `SessionDelegate` is to subclass it. Subclassing allows you completely customize the behavior of the API or to create a proxy for the API and still use the default implementation. Creating a proxy allows you to log events, emit notifications, provide pre and post hook implementations, etc. Here's a quick example of subclassing the `SessionDelegate` and logging a message when a redirect occurs. ```swift -final class User: ResponseObjectSerializable { - let username: String - let name: String +class LoggingSessionDelegate: SessionDelegate { + override func urlSession( + _ session: URLSession, + task: URLSessionTask, + willPerformHTTPRedirection response: HTTPURLResponse, + newRequest request: URLRequest, + completionHandler: @escaping (URLRequest?) -> Void) + { + print("URLSession will perform HTTP redirection to request: \(request)") - init?(response: NSHTTPURLResponse, representation: AnyObject) { - self.username = response.URL!.lastPathComponent! - self.name = representation.valueForKeyPath("name") as! String + super.urlSession( + session, + task: task, + willPerformHTTPRedirection: response, + newRequest: request, + completionHandler: completionHandler + ) } } ``` -```swift -Alamofire.request(.GET, "https://example.com/users/mattt") - .responseObject { (response: Response) in - debugPrint(response) - } -``` - -The same approach can also be used to handle endpoints that return a representation of a collection of objects: - -```swift -public protocol ResponseCollectionSerializable { - static func collection(response response: NSHTTPURLResponse, representation: AnyObject) -> [Self] -} +Generally speaking, either the default implementation or the override closures should provide the necessary functionality required. Subclassing should only be used as a last resort. -extension ResponseCollectionSerializable where Self: ResponseObjectSerializable { - static func collection(response response: NSHTTPURLResponse, representation: AnyObject) -> [Self] { - var collection = [Self]() - - if let representation = representation as? [[String: AnyObject]] { - for itemRepresentation in representation { - if let item = Self(response: response, representation: itemRepresentation) { - collection.append(item) - } - } - } - - return collection - } -} +> It is important to keep in mind that the `subdelegates` are initialized and destroyed in the default implementation. Be careful when subclassing to not introduce memory leaks. -extension Alamofire.Request { - public func responseCollection(completionHandler: Response<[T], BackendError> -> Void) -> Self { - let responseSerializer = ResponseSerializer<[T], BackendError> { request, response, data, error in - guard error == nil else { return .Failure(.Network(error: error!)) } +### Request - let JSONSerializer = Request.JSONResponseSerializer(options: .AllowFragments) - let result = JSONSerializer.serializeResponse(request, response, data, error) +The result of a `request`, `download`, `upload` or `stream` methods are a `DataRequest`, `DownloadRequest`, `UploadRequest` and `StreamRequest` which all inherit from `Request`. All `Request` instances are always created by an owning session manager, and never initialized directly. - switch result { - case .Success(let value): - if let response = response { - return .Success(T.collection(response: response, representation: value)) - } else { - return .Failure(. ObjectSerialization(reason: "Response collection could not be serialized due to nil response")) - } - case .Failure(let error): - return .Failure(.JSONSerialization(error: error)) - } - } +Each subclass has specialized methods such as `authenticate`, `validate`, `responseJSON` and `uploadProgress` that each return the caller instance in order to facilitate method chaining. - return response(responseSerializer: responseSerializer, completionHandler: completionHandler) - } -} -``` +Requests can be suspended, resumed and cancelled: -```swift -final class User: ResponseObjectSerializable, ResponseCollectionSerializable { - let username: String - let name: String +- `suspend()`: Suspends the underlying task and dispatch queue. +- `resume()`: Resumes the underlying task and dispatch queue. If the owning manager does not have `startRequestsImmediately` set to `true`, the request must call `resume()` in order to start. +- `cancel()`: Cancels the underlying task, producing an error that is passed to any registered response handlers. - init?(response: NSHTTPURLResponse, representation: AnyObject) { - self.username = response.URL!.lastPathComponent! - self.name = representation.valueForKeyPath("name") as! String - } -} -``` +### Routing Requests -```swift -Alamofire.request(.GET, "http://example.com/users") - .responseCollection { (response: Response<[User], BackendError>) in - debugPrint(response) - } -``` +As apps grow in size, it's important to adopt common patterns as you build out your network stack. An important part of that design is how to route your requests. The Alamofire `URLConvertible` and `URLRequestConvertible` protocols along with the `Router` design pattern are here to help. -### URLStringConvertible +#### URLConvertible -Types adopting the `URLStringConvertible` protocol can be used to construct URL strings, which are then used to construct URL requests. `NSString`, `NSURL`, `NSURLComponents`, and `NSURLRequest` conform to `URLStringConvertible` by default, allowing any of them to be passed as `URLString` parameters to the `request`, `upload`, and `download` methods: +Types adopting the `URLConvertible` protocol can be used to construct URLs, which are then used to construct URL requests internally. `String`, `URL`, and `URLComponents` conform to `URLConvertible` by default, allowing any of them to be passed as `url` parameters to the `request`, `upload`, and `download` methods: ```swift -let string = NSString(string: "https://httpbin.org/post") -Alamofire.request(.POST, string) +let urlString = "https://httpbin.org/post" +Alamofire.request(urlString, method: .post) -let URL = NSURL(string: string)! -Alamofire.request(.POST, URL) +let url = URL(string: urlString)! +Alamofire.request(url, method: .post) -let URLRequest = NSURLRequest(URL: URL) -Alamofire.request(.POST, URLRequest) // overrides `HTTPMethod` of `URLRequest` - -let URLComponents = NSURLComponents(URL: URL, resolvingAgainstBaseURL: true) -Alamofire.request(.POST, URLComponents) +let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: true) +Alamofire.request(.post, URLComponents) ``` -Applications interacting with web applications in a significant manner are encouraged to have custom types conform to `URLStringConvertible` as a convenient way to map domain-specific models to server resources. +Applications interacting with web applications in a significant manner are encouraged to have custom types conform to `URLConvertible` as a convenient way to map domain-specific models to server resources. -#### Type-Safe Routing +##### Type-Safe Routing ```swift -extension User: URLStringConvertible { - static let baseURLString = "http://example.com" +extension User: URLConvertible { + static let baseURLString = "https://example.com" - var URLString: String { - return User.baseURLString + "/users/\(username)/" + func asURL() throws -> URL { + let urlString = User.baseURLString + "/users/\(username)/" + return try urlString.asURL() } } ``` ```swift let user = User(username: "mattt") -Alamofire.request(.GET, user) // http://example.com/users/mattt +Alamofire.request(user) // https://example.com/users/mattt ``` -### URLRequestConvertible +#### URLRequestConvertible -Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. `NSURLRequest` conforms to `URLRequestConvertible` by default, allowing it to be passed into `request`, `upload`, and `download` methods directly (this is the recommended way to specify custom HTTP body for individual requests): +Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. `URLRequest` conforms to `URLRequestConvertible` by default, allowing it to be passed into `request`, `upload`, and `download` methods directly (this is the recommended way to specify custom HTTP body for individual requests): ```swift -let URL = NSURL(string: "https://httpbin.org/post")! -let mutableURLRequest = NSMutableURLRequest(URL: URL) -mutableURLRequest.HTTPMethod = "POST" +let url = URL(string: "https://httpbin.org/post")! +var urlRequest = URLRequest(url: url) +urlRequest.httpMethod = "POST" let parameters = ["foo": "bar"] do { - mutableURLRequest.HTTPBody = try NSJSONSerialization.dataWithJSONObject(parameters, options: NSJSONWritingOptions()) + urlRequest.httpBody = try JSONSerialization.data(withJSONObject: parameters, options: []) } catch { // No-op } -mutableURLRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") +urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") -Alamofire.request(mutableURLRequest) +Alamofire.request(urlRequest) ``` Applications interacting with web applications in a significant manner are encouraged to have custom types conform to `URLRequestConvertible` as a way to ensure consistency of requested endpoints. Such an approach can be used to abstract away server-side inconsistencies and provide type-safe routing, as well as manage authentication credentials and other state. -#### API Parameter Abstraction +##### API Parameter Abstraction ```swift enum Router: URLRequestConvertible { - static let baseURLString = "http://example.com" - static let perPage = 50 + case search(query: String, page: Int) - case Search(query: String, page: Int) + static let baseURLString = "https://example.com" + static let perPage = 50 // MARK: URLRequestConvertible - var URLRequest: NSMutableURLRequest { - let result: (path: String, parameters: [String: AnyObject]) = { + func asURLRequest() throws -> URLRequest { + let result: (path: String, parameters: Parameters) = { switch self { - case .Search(let query, let page) where page > 0: + case let .search(query, page) where page > 0: return ("/search", ["q": query, "offset": Router.perPage * page]) - case .Search(let query, _): + case let .search(query, _): return ("/search", ["q": query]) } }() - let URL = NSURL(string: Router.baseURLString)! - let URLRequest = NSURLRequest(URL: URL.URLByAppendingPathComponent(result.path)) - let encoding = Alamofire.ParameterEncoding.URL + let url = try Router.baseURLString.asURL() + let urlRequest = URLRequest(url: url.appendingPathComponent(result.path)) - return encoding.encode(URLRequest, parameters: result.parameters).0 + return try URLEncoding.default.encode(urlRequest, with: result.parameters) } } ``` ```swift -Alamofire.request(Router.Search(query: "foo bar", page: 1)) // ?q=foo%20bar&offset=50 +Alamofire.request(Router.search(query: "foo bar", page: 1)) // ?q=foo%20bar&offset=50 ``` -#### CRUD & Authorization +##### CRUD & Authorization ```swift +import Alamofire + enum Router: URLRequestConvertible { - static let baseURLString = "http://example.com" - static var OAuthToken: String? + case createUser(parameters: Parameters) + case readUser(username: String) + case updateUser(username: String, parameters: Parameters) + case destroyUser(username: String) - case CreateUser([String: AnyObject]) - case ReadUser(String) - case UpdateUser(String, [String: AnyObject]) - case DestroyUser(String) + static let baseURLString = "https://example.com" - var method: Alamofire.Method { + var method: HTTPMethod { switch self { - case .CreateUser: - return .POST - case .ReadUser: - return .GET - case .UpdateUser: - return .PUT - case .DestroyUser: - return .DELETE + case .createUser: + return .post + case .readUser: + return .get + case .updateUser: + return .put + case .destroyUser: + return .delete } } var path: String { switch self { - case .CreateUser: + case .createUser: return "/users" - case .ReadUser(let username): + case .readUser(let username): return "/users/\(username)" - case .UpdateUser(let username, _): + case .updateUser(let username, _): return "/users/\(username)" - case .DestroyUser(let username): + case .destroyUser(let username): return "/users/\(username)" } } // MARK: URLRequestConvertible - var URLRequest: NSMutableURLRequest { - let URL = NSURL(string: Router.baseURLString)! - let mutableURLRequest = NSMutableURLRequest(URL: URL.URLByAppendingPathComponent(path)) - mutableURLRequest.HTTPMethod = method.rawValue + func asURLRequest() throws -> URLRequest { + let url = try Router.baseURLString.asURL() - if let token = Router.OAuthToken { - mutableURLRequest.setValue("Bearer \(token)", forHTTPHeaderField: "Authorization") - } + var urlRequest = URLRequest(url: url.appendingPathComponent(path)) + urlRequest.httpMethod = method.rawValue switch self { - case .CreateUser(let parameters): - return Alamofire.ParameterEncoding.JSON.encode(mutableURLRequest, parameters: parameters).0 - case .UpdateUser(_, let parameters): - return Alamofire.ParameterEncoding.URL.encode(mutableURLRequest, parameters: parameters).0 + case .createUser(let parameters): + urlRequest = try URLEncoding.default.encode(urlRequest, with: parameters) + case .updateUser(_, let parameters): + urlRequest = try URLEncoding.default.encode(urlRequest, with: parameters) default: - return mutableURLRequest + break } + + return urlRequest } } ``` ```swift -Alamofire.request(Router.ReadUser("mattt")) // GET /users/mattt +Alamofire.request(Router.readUser("mattt")) // GET /users/mattt ``` -### SessionDelegate +### Adapting and Retrying Requests -By default, an Alamofire `Manager` instance creates an internal `SessionDelegate` object to handle all the various types of delegate callbacks that are generated by the underlying `NSURLSession`. The implementations of each delegate method handle the most common use cases for these types of calls abstracting the complexity away from the top-level APIs. However, advanced users may find the need to override the default functionality for various reasons. +Most web services these days are behind some sort of authentication system. One of the more common ones today is OAuth. This generally involves generating an access token authorizing your application or user to call the various supported web services. While creating these initial access tokens can be laborsome, it can be even more complicated when your access token expires and you need to fetch a new one. There are many thread-safety issues that need to be considered. -#### Override Closures +The `RequestAdapter` and `RequestRetrier` protocols were created to make it much easier to create a thread-safe authentication system for a specific set of web services. -The first way to customize the `SessionDelegate` behavior is through the use of the override closures. Each closure gives you the ability to override the implementation of the matching `SessionDelegate` API, yet still use the default implementation for all other APIs. This makes it easy to customize subsets of the delegate functionality. Here are a few examples of some of the override closures available: +#### RequestAdapter + +The `RequestAdapter` protocol allows each `Request` made on a `SessionManager` to be inspected and adapted before being created. One very specific way to use an adapter is to append an `Authorization` header to requests behind a certain type of authentication. ```swift -/// Overrides default behavior for NSURLSessionDelegate method `URLSession:didReceiveChallenge:completionHandler:`. -public var sessionDidReceiveChallenge: ((NSURLSession, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? +class AccessTokenAdapter: RequestAdapter { + private let accessToken: String + + init(accessToken: String) { + self.accessToken = accessToken + } -/// Overrides default behavior for NSURLSessionDelegate method `URLSessionDidFinishEventsForBackgroundURLSession:`. -public var sessionDidFinishEventsForBackgroundURLSession: ((NSURLSession) -> Void)? + func adapt(_ urlRequest: URLRequest) throws -> URLRequest { + var urlRequest = urlRequest -/// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:`. -public var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> NSURLRequest?)? + if urlRequest.urlString.hasPrefix("https://httpbin.org") { + urlRequest.setValue("Bearer " + accessToken, forHTTPHeaderField: "Authorization") + } -/// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:willCacheResponse:completionHandler:`. -public var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> NSCachedURLResponse?)? + return urlRequest + } +} ``` -The following is a short example of how to use the `taskWillPerformHTTPRedirection` to avoid following redirects to any `apple.com` domains. +```swift +let sessionManager = SessionManager() +sessionManager.adapter = AccessTokenAdapter(accessToken: "1234") + +sessionManager.request("https://httpbin.org/get") +``` + +#### RequestRetrier + +The `RequestRetrier` protocol allows a `Request` that encountered an `Error` while being executed to be retried. When using both the `RequestAdapter` and `RequestRetrier` protocols together, you can create credential refresh systems for OAuth1, OAuth2, Basic Auth and even exponential backoff retry policies. The possibilities are endless. Here's an example of how you could implement a refresh flow for OAuth2 access tokens. + +> **DISCLAIMER:** This is **NOT** a global `OAuth2` solution. It is merely an example demonstrating how one could use the `RequestAdapter` in conjunction with the `RequestRetrier` to create a thread-safe refresh system. + +> To reiterate, **do NOT copy** this sample code and drop it into a production application. This is merely an example. Each authentication system must be tailored to a particular platform and authentication type. ```swift -let delegate: Alamofire.Manager.SessionDelegate = manager.delegate +class OAuth2Handler: RequestAdapter, RequestRetrier { + private typealias RefreshCompletion = (_ succeeded: Bool, _ accessToken: String?, _ refreshToken: String?) -> Void -delegate.taskWillPerformHTTPRedirection = { session, task, response, request in - var finalRequest = request + private let sessionManager: SessionManager = { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = SessionManager.defaultHTTPHeaders - if let originalRequest = task.originalRequest where originalRequest.URLString.containsString("apple.com") { - finalRequest = originalRequest - } + return SessionManager(configuration: configuration) + }() + + private let lock = NSLock() + + private var clientID: String + private var baseURLString: String + private var accessToken: String + private var refreshToken: String + + private var isRefreshing = false + private var requestsToRetry: [RequestRetryCompletion] = [] + + // MARK: - Initialization + + public init(clientID: String, baseURLString: String, accessToken: String, refreshToken: String) { + self.clientID = clientID + self.baseURLString = baseURLString + self.accessToken = accessToken + self.refreshToken = refreshToken + } - return finalRequest + // MARK: - RequestAdapter + + func adapt(_ urlRequest: URLRequest) throws -> URLRequest { + if let url = urlRequest.url, url.urlString.hasPrefix(baseURLString) { + var urlRequest = urlRequest + urlRequest.setValue("Bearer " + accessToken, forHTTPHeaderField: "Authorization") + return urlRequest + } + + return urlRequest + } + + // MARK: - RequestRetrier + + func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion) { + lock.lock() ; defer { lock.unlock() } + + if let response = request.task.response as? HTTPURLResponse, response.statusCode == 401 { + requestsToRetry.append(completion) + + if !isRefreshing { + refreshTokens { [weak self] succeeded, accessToken, refreshToken in + guard let strongSelf = self else { return } + + strongSelf.lock.lock() ; defer { strongSelf.lock.unlock() } + + if let accessToken = accessToken, let refreshToken = refreshToken { + strongSelf.accessToken = accessToken + strongSelf.refreshToken = refreshToken + } + + strongSelf.requestsToRetry.forEach { $0(succeeded, 0.0) } + strongSelf.requestsToRetry.removeAll() + } + } + } else { + completion(false, 0.0) + } + } + + // MARK: - Private - Refresh Tokens + + private func refreshTokens(completion: @escaping RefreshCompletion) { + guard !isRefreshing else { return } + + isRefreshing = true + + let urlString = "\(baseURLString)/oauth2/token" + + let parameters: [String: Any] = [ + "access_token": accessToken, + "refresh_token": refreshToken, + "client_id": clientID, + "grant_type": "refresh_token" + ] + + sessionManager.request(urlString, method: .post, parameters: parameters, encoding: JSONEncoding.default) + .responseJSON { [weak self] response in + guard let strongSelf = self else { return } + + if let json = response.result.value as? [String: String] { + completion(true, json["access_token"], json["refresh_token"]) + } else { + completion(false, nil, nil) + } + + strongSelf.isRefreshing = false + } + } } ``` -#### Subclassing +```swift +let baseURLString = "https://some.domain-behind-oauth2.com" -Another way to override the default implementation of the `SessionDelegate` is to subclass it. Subclassing allows you completely customize the behavior of the API or to create a proxy for the API and still use the default implementation. Creating a proxy allows you to log events, emit notifications, provide pre and post hook implementations, etc. Here's a quick example of subclassing the `SessionDelegate` and logging a message when a redirect occurs. +let oauthHandler = OAuth2Handler( + clientID: "12345678", + baseURLString: baseURLString, + accessToken: "abcd1234", + refreshToken: "ef56789a" +) + +let sessionManager = SessionManager() +sessionManager.adapter = oauthHandler +sessionManager.retrier = oauthHandler + +let urlString = "\(baseURLString)/some/endpoint" + +sessionManager.request(urlString).validate().responseJSON { response in + debugPrint(response) +} +``` + +Once the `OAuth2Handler` is applied as both the `adapter` and `retrier` for the `SessionManager`, it will handle an invalid access token error by automatically refreshing the access token and retrying all failed requests in the same order they failed. + +> If you needed them to execute in the same order they were created, you could sort them by their task identifiers. + +The example above only checks for a `401` response code which is not nearly robust enough, but does demonstrate how one could check for an invalid access token error. In a production application, one would want to check the `realm` and most likely the `www-authenticate` header response although it depends on the OAuth2 implementation. + +Another important note is that this authentication system could be shared between multiple session managers. For example, you may need to use both a `default` and `ephemeral` session configuration for the same set of web services. The example above allows the same `oauthHandler` instance to be shared across multiple session managers to manage the single refresh flow. + +### Custom Response Serialization + +#### Handling Errors + +Before implementing custom response serializers or object serialization methods, it's important to consider how to handle any errors that may occur. There are two basic options: passing existing errors along unmodified, to be dealt with at response time; or, wrapping all errors in an `Error` type specific to your app. + +For example, here's a simple `BackendError` enum which will be used in later examples: ```swift -class LoggingSessionDelegate: Manager.SessionDelegate { - override func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - willPerformHTTPRedirection response: NSHTTPURLResponse, - newRequest request: NSURLRequest, - completionHandler: NSURLRequest? -> Void) - { - print("URLSession will perform HTTP redirection to request: \(request)") +enum BackendError: Error { + case network(error: Error) // Capture any underlying Error from the URLSession API + case dataSerialization(error: Error) + case jsonSerialization(error: Error) + case xmlSerialization(error: Error) + case objectSerialization(reason: String) +} +``` - super.URLSession( - session, - task: task, - willPerformHTTPRedirection: response, - newRequest: request, +#### Creating a Custom Response Serializer + +Alamofire provides built-in response serialization for strings, JSON, and property lists, but others can be added in extensions on `Alamofire.DataRequest` and / or `Alamofire.DownloadRequest`. + +For example, here's how a response handler using [Ono](https://github.com/mattt/Ono) might be implemented: + +```swift +extension DataRequest { + static func xmlResponseSerializer() -> DataResponseSerializer { + return DataResponseSerializer { request, response, data, error in + // Pass through any underlying URLSession error to the .network case. + 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. + 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)) + } + + do { + let xml = try ONOXMLDocument(data: validData) + return .success(xml) + } catch { + return .failure(BackendError.xmlSerialization(error: error)) + } + } + } + + @discardableResult + func responseXMLDocument( + queue: DispatchQueue? = nil, + completionHandler: @escaping (DataResponse) -> Void) + -> Self + { + return response( + queue: queue, + responseSerializer: DataRequest.xmlResponseSerializer(), completionHandler: completionHandler ) } } ``` -Generally, either the default implementation or the override closures should provide the necessary functionality required. Subclassing should only be used as a last resort. +#### Generic Response Object Serialization -> It is important to keep in mind that the `subdelegates` are initialized and destroyed in the default implementation. Be careful when subclassing to not introduce memory leaks. +Generics can be used to provide automatic, type-safe response object serialization. + +```swift +protocol ResponseObjectSerializable { + init?(response: HTTPURLResponse, representation: Any) +} + +extension DataRequest { + func responseObject( + queue: DispatchQueue? = nil, + completionHandler: @escaping (DataResponse) -> Void) + -> Self + { + let responseSerializer = DataResponseSerializer { request, response, data, error in + guard error == nil else { return .failure(BackendError.network(error: error!)) } + + 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!)) + } + + guard let response = response, let responseObject = T(response: response, representation: jsonObject) else { + return .failure(BackendError.objectSerialization(reason: "JSON could not be serialized: \(jsonObject)")) + } + + return .success(responseObject) + } + + return response(queue: queue, responseSerializer: responseSerializer, completionHandler: completionHandler) + } +} +``` + +```swift +struct User: ResponseObjectSerializable, CustomStringConvertible { + let username: String + let name: String + + var description: String { + return "User: { username: \(username), name: \(name) }" + } + + init?(response: HTTPURLResponse, representation: Any) { + guard + let username = response.url?.lastPathComponent, + let representation = representation as? [String: Any], + let name = representation["name"] as? String + else { return nil } + + self.username = username + self.name = name + } +} +``` + +```swift +Alamofire.request("https://example.com/users/mattt").responseObject { (response: DataResponse) in + debugPrint(response) + + if let user = response.result.value { + print("User: { username: \(user.username), name: \(user.name) }") + } +} +``` + +The same approach can also be used to handle endpoints that return a representation of a collection of objects: + +```swift +protocol ResponseCollectionSerializable { + static func collection(from response: HTTPURLResponse, withRepresentation representation: Any) -> [Self] +} + +extension ResponseCollectionSerializable where Self: ResponseObjectSerializable { + static func collection(from response: HTTPURLResponse, withRepresentation representation: Any) -> [Self] { + var collection: [Self] = [] + + if let representation = representation as? [[String: Any]] { + for itemRepresentation in representation { + if let item = Self(response: response, representation: itemRepresentation) { + collection.append(item) + } + } + } + + return collection + } +} +``` + +```swift +extension DataRequest { + @discardableResult + func responseCollection( + queue: DispatchQueue? = nil, + completionHandler: @escaping (DataResponse<[T]>) -> Void) -> Self + { + let responseSerializer = DataResponseSerializer<[T]> { request, response, data, error in + guard error == nil else { return .failure(BackendError.network(error: error!)) } + + 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!)) + } + + guard let response = response else { + let reason = "Response collection could not be serialized due to nil response." + return .failure(BackendError.objectSerialization(reason: reason)) + } + + return .success(T.collection(from: response, withRepresentation: jsonObject)) + } + + return response(responseSerializer: responseSerializer, completionHandler: completionHandler) + } +} +``` + +```swift +struct User: ResponseObjectSerializable, ResponseCollectionSerializable, CustomStringConvertible { + let username: String + let name: String + + var description: String { + return "User: { username: \(username), name: \(name) }" + } + + init?(response: HTTPURLResponse, representation: Any) { + guard + let username = response.url?.lastPathComponent, + let representation = representation as? [String: Any], + let name = representation["name"] as? String + else { return nil } + + self.username = username + self.name = name + } +} +``` + +```swift +Alamofire.request("https://example.com/users").responseCollection { (response: DataResponse<[User]>) in + debugPrint(response) + + if let users = response.result.value { + users.forEach { print("- \($0)") } + } +} +``` ### Security @@ -1124,10 +1554,10 @@ Using a secure HTTPS connection when communicating with servers and web services #### ServerTrustPolicy -The `ServerTrustPolicy` enumeration evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when connecting to a server over a secure HTTPS connection. +The `ServerTrustPolicy` enumeration evaluates the server trust generally provided by an `URLAuthenticationChallenge` when connecting to a server over a secure HTTPS connection. ```swift -let serverTrustPolicy = ServerTrustPolicy.PinCertificates( +let serverTrustPolicy = ServerTrustPolicy.pinCertificates( certificates: ServerTrustPolicy.certificatesInBundle(), validateCertificateChain: true, validateHost: true @@ -1136,41 +1566,41 @@ let serverTrustPolicy = ServerTrustPolicy.PinCertificates( There are many different cases of server trust evaluation giving you complete control over the validation process: -* `PerformDefaultEvaluation`: Uses the default server trust evaluation while allowing you to control whether to validate the host provided by the challenge. -* `PinCertificates`: Uses the pinned certificates to validate the server trust. The server trust is considered valid if one of the pinned certificates match one of the server certificates. -* `PinPublicKeys`: Uses the pinned public keys to validate the server trust. The server trust is considered valid if one of the pinned public keys match one of the server certificate public keys. -* `DisableEvaluation`: Disables all evaluation which in turn will always consider any server trust as valid. -* `CustomEvaluation`: Uses the associated closure to evaluate the validity of the server trust thus giving you complete control over the validation process. Use with caution. +* `performDefaultEvaluation`: Uses the default server trust evaluation while allowing you to control whether to validate the host provided by the challenge. +* `pinCertificates`: Uses the pinned certificates to validate the server trust. The server trust is considered valid if one of the pinned certificates match one of the server certificates. +* `pinPublicKeys`: Uses the pinned public keys to validate the server trust. The server trust is considered valid if one of the pinned public keys match one of the server certificate public keys. +* `disableEvaluation`: Disables all evaluation which in turn will always consider any server trust as valid. +* `customEvaluation`: Uses the associated closure to evaluate the validity of the server trust thus giving you complete control over the validation process. Use with caution. #### Server Trust Policy Manager -The `ServerTrustPolicyManager` is responsible for storing an internal mapping of server trust policies to a particular host. This allows Alamofire to evaluate each host against a different server trust policy. +The `ServerTrustPolicyManager` is responsible for storing an internal mapping of server trust policies to a particular host. This allows Alamofire to evaluate each host against a different server trust policy. ```swift let serverTrustPolicies: [String: ServerTrustPolicy] = [ - "test.example.com": .PinCertificates( + "test.example.com": .pinCertificates( certificates: ServerTrustPolicy.certificatesInBundle(), validateCertificateChain: true, validateHost: true ), - "insecure.expired-apis.com": .DisableEvaluation + "insecure.expired-apis.com": .disableEvaluation ] -let manager = Manager( +let sessionManager = SessionManager( serverTrustPolicyManager: ServerTrustPolicyManager(policies: serverTrustPolicies) ) ``` -> Make sure to keep a reference to the new `Manager` instance, otherwise your requests will all get cancelled when your `manager` is deallocated. +> Make sure to keep a reference to the new `SessionManager` instance, otherwise your requests will all get cancelled when your `sessionManager` is deallocated. These server trust policies will result in the following behavior: -* `test.example.com` will always use certificate pinning with certificate chain and host validation enabled thus requiring the following criteria to be met to allow the TLS handshake to succeed: - * Certificate chain MUST be valid. - * Certificate chain MUST include one of the pinned certificates. - * Challenge host MUST match the host in the certificate chain's leaf certificate. -* `insecure.expired-apis.com` will never evaluate the certificate chain and will always allow the TLS handshake to succeed. -* All other hosts will use the default evaluation provided by Apple. +- `test.example.com` will always use certificate pinning with certificate chain and host validation enabled thus requiring the following criteria to be met to allow the TLS handshake to succeed: + - Certificate chain MUST be valid. + - Certificate chain MUST include one of the pinned certificates. + - Challenge host MUST match the host in the certificate chain's leaf certificate. +- `insecure.expired-apis.com` will never evaluate the certificate chain and will always allow the TLS handshake to succeed. +- All other hosts will use the default evaluation provided by Apple. ##### Subclassing Server Trust Policy Manager @@ -1178,7 +1608,7 @@ If you find yourself needing more flexible server trust policy matching behavior ```swift class CustomServerTrustPolicyManager: ServerTrustPolicyManager { - override func serverTrustPolicyForHost(host: String) -> ServerTrustPolicy? { + override func serverTrustPolicy(forHost host: String) -> ServerTrustPolicy? { var policy: ServerTrustPolicy? // Implement your custom domain matching behavior... @@ -1190,7 +1620,7 @@ class CustomServerTrustPolicyManager: ServerTrustPolicyManager { #### Validating the Host -The `.PerformDefaultEvaluation`, `.PinCertificates` and `.PinPublicKeys` server trust policies all take a `validateHost` parameter. Setting the value to `true` will cause the server trust evaluation to verify that hostname in the certificate matches the hostname of the challenge. If they do not match, evaluation will fail. A `validateHost` value of `false` will still evaluate the full certificate chain, but will not validate the hostname of the leaf certificate. +The `.performDefaultEvaluation`, `.pinCertificates` and `.pinPublicKeys` server trust policies all take a `validateHost` parameter. Setting the value to `true` will cause the server trust evaluation to verify that hostname in the certificate matches the hostname of the challenge. If they do not match, evaluation will fail. A `validateHost` value of `false` will still evaluate the full certificate chain, but will not validate the hostname of the leaf certificate. > It is recommended that `validateHost` always be set to `true` in production environments. @@ -1253,23 +1683,25 @@ manager?.startListening() There are some important things to remember when using network reachability to determine what to do next. -* **Do NOT** use Reachability to determine if a network request should be sent. - * You should **ALWAYS** send it. -* When Reachability is restored, use the event to retry failed network requests. - * Even though the network requests may still fail, this is a good moment to retry them. -* The network reachability status can be useful for determining why a network request may have failed. - * If a network request fails, it is more useful to tell the user that the network request failed due to being offline rather than a more technical error, such as "request timed out." +- **Do NOT** use Reachability to determine if a network request should be sent. + - You should **ALWAYS** send it. +- When Reachability is restored, use the event to retry failed network requests. + - Even though the network requests may still fail, this is a good moment to retry them. +- The network reachability status can be useful for determining why a network request may have failed. + - If a network request fails, it is more useful to tell the user that the network request failed due to being offline rather than a more technical error, such as "request timed out." > It is recommended to check out [WWDC 2012 Session 706, "Networking Best Practices"](https://developer.apple.com/videos/play/wwdc2012-706/) for more info. --- -## Open Rdars +## Open Radars -The following rdars have some affect on the current implementation of Alamofire. +The following radars have some affect 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 +- [`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 +- `rdar://26870455` - Background URL Session Configurations do not work in the simulator +- `rdar://26849668` - Some URLProtocol APIs do not properly handle `URLRequest` ## FAQ @@ -1277,6 +1709,12 @@ The following rdars have some affect on the current implementation of Alamofire. Alamofire is named after the [Alamo Fire flower](https://aggie-horticulture.tamu.edu/wildseed/alamofire.html), a hybrid variant of the Bluebonnet, the official state flower of Texas. +### What logic belongs in a Router vs. a Request Adapter? + +Simple, static data such as paths, parameters and common headers belong in the `Router`. Dynamic data such as an `Authorization` header whose value can changed based on an authentication system belongs in a `RequestAdapter`. + +The reason the dynamic data MUST be placed into the `RequestAdapter` is to support retry operations. When a `Request` is retried, the original request is not rebuilt meaning the `Router` will not be called again. The `RequestAdapter` is called again allowing the dynamic data to be updated on the original request before retrying the `Request`. + --- ## Credits @@ -1291,11 +1729,11 @@ If you believe you have identified a security vulnerability with Alamofire, you The [ASF](https://github.com/Alamofire/Foundation#members) is looking to raise money to officially register as a federal non-profit organization. Registering will allow us members to gain some legal protections and also allow us to put donations to use, tax free. Donating to the ASF will enable us to: -* Pay our legal fees to register as a federal non-profit organization -* Pay our yearly legal fees to keep the non-profit in good status -* Pay for our mail servers to help us stay on top of all questions and security issues -* Potentially fund test servers to make it easier for us to test the edge cases -* Potentially fund developers to work on one of our projects full-time +- Pay our legal fees to register as a federal non-profit organization +- Pay our yearly legal fees to keep the non-profit in good status +- Pay for our mail servers to help us stay on top of all questions and security issues +- Potentially fund test servers to make it easier for us to test the edge cases +- Potentially fund developers to work on one of our projects full-time The community adoption of the ASF libraries has been amazing. We are greatly humbled by your 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. diff --git a/Pods/Alamofire/Source/AFError.swift b/Pods/Alamofire/Source/AFError.swift new file mode 100644 index 0000000..836d1f9 --- /dev/null +++ b/Pods/Alamofire/Source/AFError.swift @@ -0,0 +1,450 @@ +// +// AFError.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// `AFError` is the error type returned by Alamofire. It encompasses a few different types of errors, each with +/// their own associated reasons. +/// +/// - invalidURL: Returned when a `URLConvertible` type fails to create a valid `URL`. +/// - parameterEncodingFailed: Returned when a parameter encoding object throws an error during the encoding process. +/// - multipartEncodingFailed: Returned when some step in the multipart encoding process fails. +/// - responseValidationFailed: Returned when a `validate()` call fails. +/// - responseSerializationFailed: Returned when a response serializer encounters an error in the serialization process. +public enum AFError: Error { + /// The underlying reason the parameter encoding error occurred. + /// + /// - missingURL: The URL request did not have a URL to encode. + /// - jsonEncodingFailed: JSON serialization failed with an underlying system error during the + /// encoding process. + /// - propertyListEncodingFailed: Property list serialization failed with an underlying system error during + /// encoding process. + public enum ParameterEncodingFailureReason { + case missingURL + case jsonEncodingFailed(error: Error) + case propertyListEncodingFailed(error: Error) + } + + /// The underlying reason the multipart encoding error occurred. + /// + /// - bodyPartURLInvalid: The `fileURL` provided for reading an encodable body part isn't a + /// file URL. + /// - bodyPartFilenameInvalid: The filename of the `fileURL` provided has either an empty + /// `lastPathComponent` or `pathExtension. + /// - bodyPartFileNotReachable: The file at the `fileURL` provided was not reachable. + /// - bodyPartFileNotReachableWithError: Attempting to check the reachability of the `fileURL` provided threw + /// an error. + /// - bodyPartFileIsDirectory: The file at the `fileURL` provided is actually a directory. + /// - bodyPartFileSizeNotAvailable: The size of the file at the `fileURL` provided was not returned by + /// the system. + /// - bodyPartFileSizeQueryFailedWithError: The attempt to find the size of the file at the `fileURL` provided + /// threw an error. + /// - bodyPartInputStreamCreationFailed: An `InputStream` could not be created for the provided `fileURL`. + /// - outputStreamCreationFailed: An `OutputStream` could not be created when attempting to write the + /// encoded data to disk. + /// - outputStreamFileAlreadyExists: The encoded body data could not be writtent disk because a file + /// already exists at the provided `fileURL`. + /// - outputStreamURLInvalid: The `fileURL` provided for writing the encoded body data to disk is + /// not a file URL. + /// - outputStreamWriteFailed: The attempt to write the encoded body data to disk failed with an + /// underlying error. + /// - inputStreamReadFailed: The attempt to read an encoded body part `InputStream` failed with + /// underlying system error. + public enum MultipartEncodingFailureReason { + case bodyPartURLInvalid(url: URL) + case bodyPartFilenameInvalid(in: URL) + case bodyPartFileNotReachable(at: URL) + case bodyPartFileNotReachableWithError(atURL: URL, error: Error) + case bodyPartFileIsDirectory(at: URL) + case bodyPartFileSizeNotAvailable(at: URL) + case bodyPartFileSizeQueryFailedWithError(forURL: URL, error: Error) + case bodyPartInputStreamCreationFailed(for: URL) + + case outputStreamCreationFailed(for: URL) + case outputStreamFileAlreadyExists(at: URL) + case outputStreamURLInvalid(url: URL) + case outputStreamWriteFailed(error: Error) + + case inputStreamReadFailed(error: Error) + } + + /// The underlying reason the response validation error occurred. + /// + /// - dataFileNil: The data file containing the server response did not exist. + /// - dataFileReadFailed: The data file containing the server response could not be read. + /// - missingContentType: The response did not contain a `Content-Type` and the `acceptableContentTypes` + /// provided did not contain wildcard type. + /// - unacceptableContentType: The response `Content-Type` did not match any type in the provided + /// `acceptableContentTypes`. + /// - unacceptableStatusCode: The response status code was not acceptable. + public enum ResponseValidationFailureReason { + case dataFileNil + case dataFileReadFailed(at: URL) + case missingContentType(acceptableContentTypes: [String]) + case unacceptableContentType(acceptableContentTypes: [String], responseContentType: String) + case unacceptableStatusCode(code: Int) + } + + /// The underlying reason the response serialization error occurred. + /// + /// - inputDataNil: The server response contained no data. + /// - inputDataNilOrZeroLength: The server response contained no data or the data was zero length. + /// - inputFileNil: The file containing the server response did not exist. + /// - inputFileReadFailed: The file containing the server response could not be read. + /// - stringSerializationFailed: String serialization failed using the provided `String.Encoding`. + /// - jsonSerializationFailed: JSON serialization failed with an underlying system error. + /// - propertyListSerializationFailed: Property list serialization failed with an underlying system error. + public enum ResponseSerializationFailureReason { + case inputDataNil + case inputDataNilOrZeroLength + case inputFileNil + case inputFileReadFailed(at: URL) + case stringSerializationFailed(encoding: String.Encoding) + case jsonSerializationFailed(error: Error) + case propertyListSerializationFailed(error: Error) + } + + case invalidURL(url: URLConvertible) + case parameterEncodingFailed(reason: ParameterEncodingFailureReason) + case multipartEncodingFailed(reason: MultipartEncodingFailureReason) + case responseValidationFailed(reason: ResponseValidationFailureReason) + case responseSerializationFailed(reason: ResponseSerializationFailureReason) +} + +// MARK: - Error Booleans + +extension AFError { + /// Returns whether the AFError is an invalid URL error. + public var isInvalidURLError: Bool { + if case .invalidURL = self { return true } + return false + } + + /// Returns whether the AFError is a parameter encoding error. When `true`, the `underlyingError` property will + /// contain the associated value. + public var isParameterEncodingError: Bool { + if case .multipartEncodingFailed = self { return true } + return false + } + + /// Returns whether the AFError is a multipart encoding error. When `true`, the `url` and `underlyingError` properties + /// will contain the associated values. + public var isMultipartEncodingError: Bool { + if case .multipartEncodingFailed = self { return true } + return false + } + + /// Returns whether the `AFError` is a response validation error. When `true`, the `acceptableContentTypes`, + /// `responseContentType`, and `responseCode` properties will contain the associated values. + public var isResponseValidationError: Bool { + if case .responseValidationFailed = self { return true } + return false + } + + /// Returns whether the `AFError` is a response serialization error. When `true`, the `failedStringEncoding` and + /// `underlyingError` properties will contain the associated values. + public var isResponseSerializationError: Bool { + if case .responseSerializationFailed = self { return true } + return false + } +} + +// MARK: - Convenience Properties + +extension AFError { + /// The `URLConvertible` associated with the error. + public var urlConvertible: URLConvertible? { + switch self { + case .invalidURL(let url): + return url + default: + return nil + } + } + + /// The `URL` associated with the error. + public var url: URL? { + switch self { + case .multipartEncodingFailed(let reason): + return reason.url + default: + return nil + } + } + + /// The `Error` returned by a system framework associated with a `.parameterEncodingFailed`, + /// `.multipartEncodingFailed` or `.responseSerializationFailed` error. + public var underlyingError: Error? { + switch self { + case .parameterEncodingFailed(let reason): + return reason.underlyingError + case .multipartEncodingFailed(let reason): + return reason.underlyingError + case .responseSerializationFailed(let reason): + return reason.underlyingError + default: + return nil + } + } + + /// The acceptable `Content-Type`s of a `.responseValidationFailed` error. + public var acceptableContentTypes: [String]? { + switch self { + case .responseValidationFailed(let reason): + return reason.acceptableContentTypes + default: + return nil + } + } + + /// The response `Content-Type` of a `.responseValidationFailed` error. + public var responseContentType: String? { + switch self { + case .responseValidationFailed(let reason): + return reason.responseContentType + default: + return nil + } + } + + /// The response code of a `.responseValidationFailed` error. + public var responseCode: Int? { + switch self { + case .responseValidationFailed(let reason): + return reason.responseCode + default: + return nil + } + } + + /// The `String.Encoding` associated with a failed `.stringResponse()` call. + public var failedStringEncoding: String.Encoding? { + switch self { + case .responseSerializationFailed(let reason): + return reason.failedStringEncoding + default: + return nil + } + } +} + +extension AFError.ParameterEncodingFailureReason { + var underlyingError: Error? { + switch self { + case .jsonEncodingFailed(let error), .propertyListEncodingFailed(let error): + return error + default: + return nil + } + } +} + +extension AFError.MultipartEncodingFailureReason { + var url: URL? { + switch self { + case .bodyPartURLInvalid(let url), .bodyPartFilenameInvalid(let url), .bodyPartFileNotReachable(let url), + .bodyPartFileIsDirectory(let url), .bodyPartFileSizeNotAvailable(let url), + .bodyPartInputStreamCreationFailed(let url), .outputStreamCreationFailed(let url), + .outputStreamFileAlreadyExists(let url), .outputStreamURLInvalid(let url), + .bodyPartFileNotReachableWithError(let url, _), .bodyPartFileSizeQueryFailedWithError(let url, _): + return url + default: + return nil + } + } + + var underlyingError: Error? { + switch self { + case .bodyPartFileNotReachableWithError(_, let error), .bodyPartFileSizeQueryFailedWithError(_, let error), + .outputStreamWriteFailed(let error), .inputStreamReadFailed(let error): + return error + default: + return nil + } + } +} + +extension AFError.ResponseValidationFailureReason { + var acceptableContentTypes: [String]? { + switch self { + case .missingContentType(let types), .unacceptableContentType(let types, _): + return types + default: + return nil + } + } + + var responseContentType: String? { + switch self { + case .unacceptableContentType(_, let reponseType): + return reponseType + default: + return nil + } + } + + var responseCode: Int? { + switch self { + case .unacceptableStatusCode(let code): + return code + default: + return nil + } + } +} + +extension AFError.ResponseSerializationFailureReason { + var failedStringEncoding: String.Encoding? { + switch self { + case .stringSerializationFailed(let encoding): + return encoding + default: + return nil + } + } + + var underlyingError: Error? { + switch self { + case .jsonSerializationFailed(let error), .propertyListSerializationFailed(let error): + return error + default: + return nil + } + } +} + +// MARK: - Error Descriptions + +extension AFError: LocalizedError { + public var errorDescription: String? { + switch self { + case .invalidURL(let url): + return "URL is not valid: \(url)" + case .parameterEncodingFailed(let reason): + return reason.localizedDescription + case .multipartEncodingFailed(let reason): + return reason.localizedDescription + case .responseValidationFailed(let reason): + return reason.localizedDescription + case .responseSerializationFailed(let reason): + return reason.localizedDescription + } + } +} + +extension AFError.ParameterEncodingFailureReason { + var localizedDescription: String { + switch self { + case .missingURL: + return "URL request to encode was missing a URL" + case .jsonEncodingFailed(let error): + return "JSON could not be encoded because of error:\n\(error.localizedDescription)" + case .propertyListEncodingFailed(let error): + return "PropertyList could not be encoded because of error:\n\(error.localizedDescription)" + } + } +} + +extension AFError.MultipartEncodingFailureReason { + var localizedDescription: String { + switch self { + case .bodyPartURLInvalid(let url): + return "The URL provided is not a file URL: \(url)" + case .bodyPartFilenameInvalid(let url): + return "The URL provided does not have a valid filename: \(url)" + case .bodyPartFileNotReachable(let url): + return "The URL provided is not reachable: \(url)" + case .bodyPartFileNotReachableWithError(let url, let error): + return ( + "The system returned an error while checking the provided URL for " + + "reachability.\nURL: \(url)\nError: \(error)" + ) + case .bodyPartFileIsDirectory(let url): + return "The URL provided is a directory: \(url)" + case .bodyPartFileSizeNotAvailable(let url): + return "Could not fetch the file size from the provided URL: \(url)" + case .bodyPartFileSizeQueryFailedWithError(let url, let error): + return ( + "The system returned an error while attempting to fetch the file size from the " + + "provided URL.\nURL: \(url)\nError: \(error)" + ) + case .bodyPartInputStreamCreationFailed(let url): + return "Failed to create an InputStream for the provided URL: \(url)" + case .outputStreamCreationFailed(let url): + return "Failed to create an OutputStream for URL: \(url)" + case .outputStreamFileAlreadyExists(let url): + return "A file already exists at the provided URL: \(url)" + case .outputStreamURLInvalid(let url): + return "The provided OutputStream URL is invalid: \(url)" + case .outputStreamWriteFailed(let error): + return "OutputStream write failed with error: \(error)" + case .inputStreamReadFailed(let error): + return "InputStream read failed with error: \(error)" + } + } +} + +extension AFError.ResponseSerializationFailureReason { + var localizedDescription: String { + switch self { + case .inputDataNil: + return "Response could not be serialized, input data was nil." + case .inputDataNilOrZeroLength: + return "Response could not be serialized, input data was nil or zero length." + case .inputFileNil: + return "Response could not be serialized, input file was nil." + case .inputFileReadFailed(let url): + return "Response could not be serialized, input file could not be read: \(url)." + case .stringSerializationFailed(let encoding): + return "String could not be serialized with encoding: \(encoding)." + case .jsonSerializationFailed(let error): + return "JSON could not be serialized because of error:\n\(error.localizedDescription)" + case .propertyListSerializationFailed(let error): + return "PropertyList could not be serialized because of error:\n\(error.localizedDescription)" + } + } +} + +extension AFError.ResponseValidationFailureReason { + var localizedDescription: String { + switch self { + case .dataFileNil: + return "Response could not be validated, data file was nil." + case .dataFileReadFailed(let url): + return "Response could not be validated, data file could not be read: \(url)." + case .missingContentType(let types): + return ( + "Response Content-Type was missing and acceptable content types " + + "(\(types.joined(separator: ","))) do not match \"*/*\"." + ) + case .unacceptableContentType(let acceptableTypes, let responseType): + return ( + "Response Content-Type \"\(responseType)\" does not match any acceptable types: " + + "\(acceptableTypes.joined(separator: ","))." + ) + case .unacceptableStatusCode(let code): + return "Response status code was unacceptable: \(code)." + } + } +} diff --git a/Pods/Alamofire/Source/Alamofire.swift b/Pods/Alamofire/Source/Alamofire.swift index 0c2ec32..92845b3 100644 --- a/Pods/Alamofire/Source/Alamofire.swift +++ b/Pods/Alamofire/Source/Alamofire.swift @@ -24,352 +24,433 @@ import Foundation -// MARK: - URLStringConvertible - -/** - Types adopting the `URLStringConvertible` protocol can be used to construct URL strings, which are then used to - construct URL requests. -*/ -public protocol URLStringConvertible { - /** - A URL that conforms to RFC 2396. - - Methods accepting a `URLStringConvertible` type parameter parse it according to RFCs 1738 and 1808. - - See https://tools.ietf.org/html/rfc2396 - See https://tools.ietf.org/html/rfc1738 - See https://tools.ietf.org/html/rfc1808 - */ - var URLString: String { get } +/// Types adopting the `URLConvertible` protocol can be used to construct URLs, which are then used to construct +/// URL requests. +public protocol URLConvertible { + /// Returns a URL that conforms to RFC 2396 or throws an `Error`. + /// + /// - throws: An `Error` if the type cannot be converted to a `URL`. + /// + /// - returns: A URL or throws an `Error`. + func asURL() throws -> URL } -extension String: URLStringConvertible { - public var URLString: String { return self } -} - -extension NSURL: URLStringConvertible { - public var URLString: String { - #if swift(>=2.3) - return absoluteString! - #else - return absoluteString - #endif +extension String: URLConvertible { + /// Returns a URL if `self` represents a valid URL string that conforms to RFC 2396 or throws an `AFError`. + /// + /// - throws: An `AFError.invalidURL` if `self` is not a valid URL string. + /// + /// - returns: A URL or throws an `AFError`. + public func asURL() throws -> URL { + guard let url = URL(string: self) else { throw AFError.invalidURL(url: self) } + return url } } -extension NSURLComponents: URLStringConvertible { - public var URLString: String { return URL!.URLString } +extension URL: URLConvertible { + /// Returns self. + public func asURL() throws -> URL { return self } } -extension NSURLRequest: URLStringConvertible { - public var URLString: String { return URL!.URLString } +extension URLComponents: URLConvertible { + /// Returns a URL if `url` is not nil, otherise throws an `Error`. + /// + /// - throws: An `AFError.invalidURL` if `url` is `nil`. + /// + /// - returns: A URL or throws an `AFError`. + public func asURL() throws -> URL { + guard let url = url else { throw AFError.invalidURL(url: self) } + return url + } } -// MARK: - URLRequestConvertible +// MARK: - -/** - Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. -*/ +/// Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. public protocol URLRequestConvertible { + /// Returns a URL request or throws if an `Error` was encountered. + /// + /// - throws: An `Error` if the underlying `URLRequest` is `nil`. + /// + /// - returns: A URL request. + func asURLRequest() throws -> URLRequest +} + +extension URLRequestConvertible { /// The URL request. - var URLRequest: NSMutableURLRequest { get } + public var urlRequest: URLRequest? { return try? asURLRequest() } } -extension NSURLRequest: URLRequestConvertible { - public var URLRequest: NSMutableURLRequest { return self.mutableCopy() as! NSMutableURLRequest } +extension URLRequest: URLRequestConvertible { + /// Returns a URL request or throws if an `Error` was encountered. + public func asURLRequest() throws -> URLRequest { return self } } -// MARK: - Convenience +// MARK: - -func URLRequest( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil) - -> NSMutableURLRequest -{ - let mutableURLRequest: NSMutableURLRequest - - if let request = URLString as? NSMutableURLRequest { - mutableURLRequest = request - } else if let request = URLString as? NSURLRequest { - mutableURLRequest = request.URLRequest - } else { - mutableURLRequest = NSMutableURLRequest(URL: NSURL(string: URLString.URLString)!) - } +extension URLRequest { + /// Creates an instance with the specified `method`, `urlString` and `headers`. + /// + /// - parameter url: The URL. + /// - parameter method: The HTTP method. + /// - parameter headers: The HTTP headers. `nil` by default. + /// + /// - returns: The new `URLRequest` instance. + public init(url: URLConvertible, method: HTTPMethod, headers: HTTPHeaders? = nil) throws { + let url = try url.asURL() + + self.init(url: url) - mutableURLRequest.HTTPMethod = method.rawValue + httpMethod = method.rawValue - if let headers = headers { - for (headerField, headerValue) in headers { - mutableURLRequest.setValue(headerValue, forHTTPHeaderField: headerField) + if let headers = headers { + for (headerField, headerValue) in headers { + setValue(headerValue, forHTTPHeaderField: headerField) + } } } - return mutableURLRequest + func adapt(using adapter: RequestAdapter?) throws -> URLRequest { + guard let adapter = adapter else { return self } + return try adapter.adapt(self) + } } -// MARK: - Request Methods - -/** - Creates a request using the shared manager instance for the specified method, URL string, parameters, and - parameter encoding. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter parameters: The parameters. `nil` by default. - - parameter encoding: The parameter encoding. `.URL` by default. - - parameter headers: The HTTP headers. `nil` by default. - - - returns: The created request. -*/ +// MARK: - Data Request + +/// Creates a `DataRequest` using the default `SessionManager` to retrieve the contents of the specified `url`, +/// `method`, `parameters`, `encoding` and `headers`. +/// +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.get` by default. +/// - parameter parameters: The parameters. `nil` by default. +/// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// +/// - returns: The created `DataRequest`. +@discardableResult public func request( - method: Method, - _ URLString: URLStringConvertible, - parameters: [String: AnyObject]? = nil, - encoding: ParameterEncoding = .URL, - headers: [String: String]? = nil) - -> Request + _ url: URLConvertible, + method: HTTPMethod = .get, + parameters: Parameters? = nil, + encoding: ParameterEncoding = URLEncoding.default, + headers: HTTPHeaders? = nil) + -> DataRequest { - return Manager.sharedInstance.request( - method, - URLString, + return SessionManager.default.request( + url, + method: method, parameters: parameters, encoding: encoding, headers: headers ) } -/** - Creates a request using the shared manager instance for the specified URL request. +/// Creates a `DataRequest` using the default `SessionManager` to retrieve the contents of a URL based on the +/// specified `urlRequest`. +/// +/// - parameter urlRequest: The URL request +/// +/// - returns: The created `DataRequest`. +@discardableResult +public func request(_ urlRequest: URLRequestConvertible) -> DataRequest { + return SessionManager.default.request(urlRequest) +} + +// MARK: - Download Request - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. +// MARK: URL Request - - parameter URLRequest: The URL request +/// Creates a `DownloadRequest` using the default `SessionManager` to retrieve the contents of the specified `url`, +/// `method`, `parameters`, `encoding`, `headers` and save them to the `destination`. +/// +/// If `destination` is not specified, the contents will remain in the temporary location determined by the +/// underlying URL session. +/// +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.get` by default. +/// - parameter parameters: The parameters. `nil` by default. +/// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. +/// +/// - returns: The created `DownloadRequest`. +@discardableResult +public func download( + _ url: URLConvertible, + method: HTTPMethod = .get, + parameters: Parameters? = nil, + encoding: ParameterEncoding = URLEncoding.default, + headers: HTTPHeaders? = nil, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest +{ + return SessionManager.default.download( + url, + method: method, + parameters: parameters, + encoding: encoding, + headers: headers, + to: destination + ) +} - - returns: The created request. -*/ -public func request(URLRequest: URLRequestConvertible) -> Request { - return Manager.sharedInstance.request(URLRequest.URLRequest) +/// Creates a `DownloadRequest` using the default `SessionManager` to retrieve the contents of a URL based on the +/// specified `urlRequest` and save them to the `destination`. +/// +/// If `destination` is not specified, the contents will remain in the temporary location determined by the +/// underlying URL session. +/// +/// - parameter urlRequest: The URL request. +/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. +/// +/// - returns: The created `DownloadRequest`. +@discardableResult +public func download( + _ urlRequest: URLRequestConvertible, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest +{ + return SessionManager.default.download(urlRequest, to: destination) } -// MARK: - Upload Methods +// MARK: Resume Data -// MARK: File +/// Creates a `DownloadRequest` using the default `SessionManager` from the `resumeData` produced from a +/// previous request cancellation to retrieve the contents of the original request and save them to the `destination`. +/// +/// If `destination` is not specified, the contents will remain in the temporary location determined by the +/// underlying URL session. +/// +/// - parameter resumeData: The resume data. This is an opaque data blob produced by `URLSessionDownloadTask` +/// when a task is cancelled. See `URLSession -downloadTask(withResumeData:)` for additional +/// information. +/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. +/// +/// - returns: The created `DownloadRequest`. +@discardableResult +public func download( + resumingWith resumeData: Data, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest +{ + return SessionManager.default.download(resumingWith: resumeData, to: destination) +} -/** - Creates an upload request using the shared manager instance for the specified method, URL string, and file. +// MARK: - Upload Request - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter file: The file to upload. +// MARK: File - - returns: The created upload request. -*/ +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` +/// for uploading the `file`. +/// +/// - parameter file: The file to upload. +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.post` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// +/// - returns: The created `UploadRequest`. +@discardableResult public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - file: NSURL) - -> Request + _ fileURL: URL, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest { - return Manager.sharedInstance.upload(method, URLString, headers: headers, file: file) + return SessionManager.default.upload(fileURL, to: url, method: method, headers: headers) } -/** - Creates an upload request using the shared manager instance for the specified URL request and file. - - - parameter URLRequest: The URL request. - - parameter file: The file to upload. - - - returns: The created upload request. -*/ -public func upload(URLRequest: URLRequestConvertible, file: NSURL) -> Request { - return Manager.sharedInstance.upload(URLRequest, file: file) +/// Creates a `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for +/// uploading the `file`. +/// +/// - parameter file: The file to upload. +/// - parameter urlRequest: The URL request. +/// +/// - returns: The created `UploadRequest`. +@discardableResult +public func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest { + return SessionManager.default.upload(fileURL, with: urlRequest) } // MARK: Data -/** - Creates an upload request using the shared manager instance for the specified method, URL string, and data. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter data: The data to upload. - - - returns: The created upload request. -*/ +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` +/// for uploading the `data`. +/// +/// - parameter data: The data to upload. +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.post` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// +/// - returns: The created `UploadRequest`. +@discardableResult public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - data: NSData) - -> Request + _ data: Data, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest { - return Manager.sharedInstance.upload(method, URLString, headers: headers, data: data) + return SessionManager.default.upload(data, to: url, method: method, headers: headers) } -/** - Creates an upload request using the shared manager instance for the specified URL request and data. - - - parameter URLRequest: The URL request. - - parameter data: The data to upload. - - - returns: The created upload request. -*/ -public func upload(URLRequest: URLRequestConvertible, data: NSData) -> Request { - return Manager.sharedInstance.upload(URLRequest, data: data) +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for +/// uploading the `data`. +/// +/// - parameter data: The data to upload. +/// - parameter urlRequest: The URL request. +/// +/// - returns: The created `UploadRequest`. +@discardableResult +public func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest { + return SessionManager.default.upload(data, with: urlRequest) } -// MARK: Stream - -/** - Creates an upload request using the shared manager instance for the specified method, URL string, and stream. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter stream: The stream to upload. - - - returns: The created upload request. -*/ +// MARK: InputStream + +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` +/// for uploading the `stream`. +/// +/// - parameter stream: The stream to upload. +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.post` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// +/// - returns: The created `UploadRequest`. +@discardableResult public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - stream: NSInputStream) - -> Request + _ stream: InputStream, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest { - return Manager.sharedInstance.upload(method, URLString, headers: headers, stream: stream) + return SessionManager.default.upload(stream, to: url, method: method, headers: headers) } -/** - Creates an upload request using the shared manager instance for the specified URL request and stream. - - - parameter URLRequest: The URL request. - - parameter stream: The stream to upload. - - - returns: The created upload request. -*/ -public func upload(URLRequest: URLRequestConvertible, stream: NSInputStream) -> Request { - return Manager.sharedInstance.upload(URLRequest, stream: stream) +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for +/// uploading the `stream`. +/// +/// - parameter urlRequest: The URL request. +/// - parameter stream: The stream to upload. +/// +/// - returns: The created `UploadRequest`. +@discardableResult +public func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest { + return SessionManager.default.upload(stream, with: urlRequest) } // MARK: MultipartFormData -/** - Creates an upload request using the shared manager instance for the specified method and URL string. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - `MultipartFormDataEncodingMemoryThreshold` by default. - - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. -*/ +/// Encodes `multipartFormData` using `encodingMemoryThreshold` with the default `SessionManager` and calls +/// `encodingCompletion` with new `UploadRequest` using the `url`, `method` and `headers`. +/// +/// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative +/// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most +/// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to +/// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory +/// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be +/// used for larger payloads such as video content. +/// +/// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory +/// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, +/// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk +/// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding +/// technique was used. +/// +/// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. +/// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. +/// `multipartFormDataEncodingMemoryThreshold` by default. +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.post` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - multipartFormData: MultipartFormData -> Void, - encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (Manager.MultipartFormDataEncodingResult -> Void)?) + multipartFormData: @escaping (MultipartFormData) -> Void, + usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil, + encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) { - return Manager.sharedInstance.upload( - method, - URLString, - headers: headers, + return SessionManager.default.upload( multipartFormData: multipartFormData, - encodingMemoryThreshold: encodingMemoryThreshold, + usingThreshold: encodingMemoryThreshold, + to: url, + method: method, + headers: headers, encodingCompletion: encodingCompletion ) } -/** - Creates an upload request using the shared manager instance for the specified method and URL string. - - - parameter URLRequest: The URL request. - - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - `MultipartFormDataEncodingMemoryThreshold` by default. - - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. -*/ +/// Encodes `multipartFormData` using `encodingMemoryThreshold` and the default `SessionManager` and +/// calls `encodingCompletion` with new `UploadRequest` using the `urlRequest`. +/// +/// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative +/// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most +/// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to +/// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory +/// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be +/// used for larger payloads such as video content. +/// +/// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory +/// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, +/// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk +/// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding +/// technique was used. +/// +/// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. +/// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. +/// `multipartFormDataEncodingMemoryThreshold` by default. +/// - parameter urlRequest: The URL request. +/// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. public func upload( - URLRequest: URLRequestConvertible, - multipartFormData: MultipartFormData -> Void, - encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (Manager.MultipartFormDataEncodingResult -> Void)?) + multipartFormData: @escaping (MultipartFormData) -> Void, + usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, + with urlRequest: URLRequestConvertible, + encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) { - return Manager.sharedInstance.upload( - URLRequest, + return SessionManager.default.upload( multipartFormData: multipartFormData, - encodingMemoryThreshold: encodingMemoryThreshold, + usingThreshold: encodingMemoryThreshold, + with: urlRequest, encodingCompletion: encodingCompletion ) } -// MARK: - Download Methods +#if !os(watchOS) -// MARK: URL Request +// MARK: - Stream Request -/** - Creates a download request using the shared manager instance for the specified method and URL string. +// MARK: Hostname and Port - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter parameters: The parameters. `nil` by default. - - parameter encoding: The parameter encoding. `.URL` by default. - - parameter headers: The HTTP headers. `nil` by default. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. -*/ -public func download( - method: Method, - _ URLString: URLStringConvertible, - parameters: [String: AnyObject]? = nil, - encoding: ParameterEncoding = .URL, - headers: [String: String]? = nil, - destination: Request.DownloadFileDestination) - -> Request -{ - return Manager.sharedInstance.download( - method, - URLString, - parameters: parameters, - encoding: encoding, - headers: headers, - destination: destination - ) +/// Creates a `StreamRequest` using the default `SessionManager` for bidirectional streaming with the `hostname` +/// and `port`. +/// +/// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. +/// +/// - parameter hostName: The hostname of the server to connect to. +/// - parameter port: The port of the server to connect to. +/// +/// - returns: The created `StreamRequest`. +@discardableResult +public func stream(withHostName hostName: String, port: Int) -> StreamRequest { + return SessionManager.default.stream(withHostName: hostName, port: port) } -/** - Creates a download request using the shared manager instance for the specified URL request. - - - parameter URLRequest: The URL request. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. -*/ -public func download(URLRequest: URLRequestConvertible, destination: Request.DownloadFileDestination) -> Request { - return Manager.sharedInstance.download(URLRequest, destination: destination) +// MARK: NetService + +/// Creates a `StreamRequest` using the default `SessionManager` for bidirectional streaming with the `netService`. +/// +/// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. +/// +/// - parameter netService: The net service used to identify the endpoint. +/// +/// - returns: The created `StreamRequest`. +@discardableResult +public func stream(with netService: NetService) -> StreamRequest { + return SessionManager.default.stream(with: netService) } -// MARK: Resume Data - -/** - Creates a request using the shared manager instance for downloading from the resume data produced from a - previous request cancellation. - - - parameter resumeData: The resume data. This is an opaque data blob produced by `NSURLSessionDownloadTask` - when a task is cancelled. See `NSURLSession -downloadTaskWithResumeData:` for additional - information. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. -*/ -public func download(resumeData data: NSData, destination: Request.DownloadFileDestination) -> Request { - return Manager.sharedInstance.download(data, destination: destination) -} +#endif diff --git a/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift b/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift new file mode 100644 index 0000000..dafe862 --- /dev/null +++ b/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift @@ -0,0 +1,42 @@ +// +// DispatchQueue+Alamofire.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Dispatch + +extension DispatchQueue { + static var userInteractive: DispatchQueue { return DispatchQueue.global(qos: .userInteractive) } + static var userInitiated: DispatchQueue { return DispatchQueue.global(qos: .userInitiated) } + static var utility: DispatchQueue { return DispatchQueue.global(qos: .utility) } + static var background: DispatchQueue { return DispatchQueue.global(qos: .background) } + + func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) { + asyncAfter(deadline: .now() + delay, execute: closure) + } + + func syncResult(_ closure: () -> T) -> T { + var result: T! + sync { result = closure() } + return result + } +} diff --git a/Pods/Alamofire/Source/Download.swift b/Pods/Alamofire/Source/Download.swift deleted file mode 100644 index ed39e33..0000000 --- a/Pods/Alamofire/Source/Download.swift +++ /dev/null @@ -1,252 +0,0 @@ -// -// Download.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Manager { - private enum Downloadable { - case Request(NSURLRequest) - case ResumeData(NSData) - } - - private func download(downloadable: Downloadable, destination: Request.DownloadFileDestination) -> Request { - var downloadTask: NSURLSessionDownloadTask! - - switch downloadable { - case .Request(let request): - dispatch_sync(queue) { - downloadTask = self.session.downloadTaskWithRequest(request) - } - case .ResumeData(let resumeData): - dispatch_sync(queue) { - downloadTask = self.session.downloadTaskWithResumeData(resumeData) - } - } - - let request = Request(session: session, task: downloadTask) - - if let downloadDelegate = request.delegate as? Request.DownloadTaskDelegate { - downloadDelegate.downloadTaskDidFinishDownloadingToURL = { session, downloadTask, URL in - return destination(URL, downloadTask.response as! NSHTTPURLResponse) - } - } - - delegate[request.delegate.task] = request.delegate - - if startRequestsImmediately { - request.resume() - } - - return request - } - - // MARK: Request - - /** - Creates a download request for the specified method, URL string, parameters, parameter encoding, headers - and destination. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter parameters: The parameters. `nil` by default. - - parameter encoding: The parameter encoding. `.URL` by default. - - parameter headers: The HTTP headers. `nil` by default. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. - */ - public func download( - method: Method, - _ URLString: URLStringConvertible, - parameters: [String: AnyObject]? = nil, - encoding: ParameterEncoding = .URL, - headers: [String: String]? = nil, - destination: Request.DownloadFileDestination) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - let encodedURLRequest = encoding.encode(mutableURLRequest, parameters: parameters).0 - - return download(encodedURLRequest, destination: destination) - } - - /** - Creates a request for downloading from the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. - */ - public func download(URLRequest: URLRequestConvertible, destination: Request.DownloadFileDestination) -> Request { - return download(.Request(URLRequest.URLRequest), destination: destination) - } - - // MARK: Resume Data - - /** - Creates a request for downloading from the resume data produced from a previous request cancellation. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter resumeData: The resume data. This is an opaque data blob produced by `NSURLSessionDownloadTask` - when a task is cancelled. See `NSURLSession -downloadTaskWithResumeData:` for - additional information. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. - */ - public func download(resumeData: NSData, destination: Request.DownloadFileDestination) -> Request { - return download(.ResumeData(resumeData), destination: destination) - } -} - -// MARK: - - -extension Request { - /** - A closure executed once a request has successfully completed in order to determine where to move the temporary - file written to during the download process. The closure takes two arguments: the temporary file URL and the URL - response, and returns a single argument: the file URL where the temporary file should be moved. - */ - public typealias DownloadFileDestination = (NSURL, NSHTTPURLResponse) -> NSURL - - /** - Creates a download file destination closure which uses the default file manager to move the temporary file to a - file URL in the first available directory with the specified search path directory and search path domain mask. - - - parameter directory: The search path directory. `.DocumentDirectory` by default. - - parameter domain: The search path domain mask. `.UserDomainMask` by default. - - - returns: A download file destination closure. - */ - public class func suggestedDownloadDestination( - directory directory: NSSearchPathDirectory = .DocumentDirectory, - domain: NSSearchPathDomainMask = .UserDomainMask) - -> DownloadFileDestination - { - return { temporaryURL, response -> NSURL in - let directoryURLs = NSFileManager.defaultManager().URLsForDirectory(directory, inDomains: domain) - - if !directoryURLs.isEmpty { - #if swift(>=2.3) - return directoryURLs[0].URLByAppendingPathComponent(response.suggestedFilename!)! - #else - return directoryURLs[0].URLByAppendingPathComponent(response.suggestedFilename!) - #endif - } - - return temporaryURL - } - } - - /// The resume data of the underlying download task if available after a failure. - public var resumeData: NSData? { - var data: NSData? - - if let delegate = delegate as? DownloadTaskDelegate { - data = delegate.resumeData - } - - return data - } - - // MARK: - DownloadTaskDelegate - - class DownloadTaskDelegate: TaskDelegate, NSURLSessionDownloadDelegate { - var downloadTask: NSURLSessionDownloadTask? { return task as? NSURLSessionDownloadTask } - var downloadProgress: ((Int64, Int64, Int64) -> Void)? - - var resumeData: NSData? - override var data: NSData? { return resumeData } - - // MARK: - NSURLSessionDownloadDelegate - - // MARK: Override Closures - - var downloadTaskDidFinishDownloadingToURL: ((NSURLSession, NSURLSessionDownloadTask, NSURL) -> NSURL)? - var downloadTaskDidWriteData: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64, Int64) -> Void)? - var downloadTaskDidResumeAtOffset: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64) -> Void)? - - // MARK: Delegate Methods - - func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didFinishDownloadingToURL location: NSURL) - { - if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { - do { - let destination = downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) - try NSFileManager.defaultManager().moveItemAtURL(location, toURL: destination) - } catch { - self.error = error as NSError - } - } - } - - func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let downloadTaskDidWriteData = downloadTaskDidWriteData { - downloadTaskDidWriteData( - session, - downloadTask, - bytesWritten, - totalBytesWritten, - totalBytesExpectedToWrite - ) - } else { - progress.totalUnitCount = totalBytesExpectedToWrite - progress.completedUnitCount = totalBytesWritten - - downloadProgress?(bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) - } - } - - func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { - if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { - downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) - } else { - progress.totalUnitCount = expectedTotalBytes - progress.completedUnitCount = fileOffset - } - } - } -} diff --git a/Pods/Alamofire/Source/Error.swift b/Pods/Alamofire/Source/Error.swift deleted file mode 100644 index 467d99c..0000000 --- a/Pods/Alamofire/Source/Error.swift +++ /dev/null @@ -1,88 +0,0 @@ -// -// Error.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// The `Error` struct provides a convenience for creating custom Alamofire NSErrors. -public struct Error { - /// The domain used for creating all Alamofire errors. - public static let Domain = "com.alamofire.error" - - /// The custom error codes generated by Alamofire. - public enum Code: Int { - case InputStreamReadFailed = -6000 - case OutputStreamWriteFailed = -6001 - case ContentTypeValidationFailed = -6002 - case StatusCodeValidationFailed = -6003 - case DataSerializationFailed = -6004 - case StringSerializationFailed = -6005 - case JSONSerializationFailed = -6006 - case PropertyListSerializationFailed = -6007 - } - - /// Custom keys contained within certain NSError `userInfo` dictionaries generated by Alamofire. - public struct UserInfoKeys { - /// The content type user info key for a `.ContentTypeValidationFailed` error stored as a `String` value. - public static let ContentType = "ContentType" - - /// The status code user info key for a `.StatusCodeValidationFailed` error stored as an `Int` value. - public static let StatusCode = "StatusCode" - } - - /** - Creates an `NSError` with the given error code and failure reason. - - - parameter code: The error code. - - parameter failureReason: The failure reason. - - - returns: An `NSError` with the given error code and failure reason. - */ - @available(*, deprecated=3.4.0) - public static func errorWithCode(code: Code, failureReason: String) -> NSError { - return errorWithCode(code.rawValue, failureReason: failureReason) - } - - /** - Creates an `NSError` with the given error code and failure reason. - - - parameter code: The error code. - - parameter failureReason: The failure reason. - - - returns: An `NSError` with the given error code and failure reason. - */ - @available(*, deprecated=3.4.0) - public static func errorWithCode(code: Int, failureReason: String) -> NSError { - let userInfo = [NSLocalizedFailureReasonErrorKey: failureReason] - return NSError(domain: Domain, code: code, userInfo: userInfo) - } - - static func error(domain domain: String = Error.Domain, code: Code, failureReason: String) -> NSError { - return error(domain: domain, code: code.rawValue, failureReason: failureReason) - } - - static func error(domain domain: String = Error.Domain, code: Int, failureReason: String) -> NSError { - let userInfo = [NSLocalizedFailureReasonErrorKey: failureReason] - return NSError(domain: domain, code: code, userInfo: userInfo) - } -} diff --git a/Pods/Alamofire/Source/Manager.swift b/Pods/Alamofire/Source/Manager.swift deleted file mode 100644 index 8f272b6..0000000 --- a/Pods/Alamofire/Source/Manager.swift +++ /dev/null @@ -1,789 +0,0 @@ -// -// Manager.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/** - Responsible for creating and managing `Request` objects, as well as their underlying `NSURLSession`. -*/ -public class Manager { - - // MARK: - Properties - - /** - A shared instance of `Manager`, used by top-level Alamofire request methods, and suitable for use directly - for any ad hoc requests. - */ - public static let sharedInstance: Manager = { - let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() - configuration.HTTPAdditionalHeaders = Manager.defaultHTTPHeaders - - return Manager(configuration: configuration) - }() - - /** - Creates default values for the "Accept-Encoding", "Accept-Language" and "User-Agent" headers. - */ - public static let defaultHTTPHeaders: [String: String] = { - // Accept-Encoding HTTP Header; see https://tools.ietf.org/html/rfc7230#section-4.2.3 - let acceptEncoding: String = "gzip;q=1.0, compress;q=0.5" - - // Accept-Language HTTP Header; see https://tools.ietf.org/html/rfc7231#section-5.3.5 - let acceptLanguage = NSLocale.preferredLanguages().prefix(6).enumerate().map { index, languageCode in - let quality = 1.0 - (Double(index) * 0.1) - return "\(languageCode);q=\(quality)" - }.joinWithSeparator(", ") - - // 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` - let userAgent: String = { - if let info = NSBundle.mainBundle().infoDictionary { - let executable = info[kCFBundleExecutableKey as String] as? String ?? "Unknown" - let bundle = info[kCFBundleIdentifierKey as String] as? String ?? "Unknown" - let appVersion = info["CFBundleShortVersionString"] as? String ?? "Unknown" - let appBuild = info[kCFBundleVersionKey as String] as? String ?? "Unknown" - - let osNameVersion: String = { - let versionString: String - - if #available(OSX 10.10, *) { - let version = NSProcessInfo.processInfo().operatingSystemVersion - versionString = "\(version.majorVersion).\(version.minorVersion).\(version.patchVersion)" - } else { - versionString = "10.9" - } - - let osName: String = { - #if os(iOS) - return "iOS" - #elseif os(watchOS) - return "watchOS" - #elseif os(tvOS) - return "tvOS" - #elseif os(OSX) - return "OS X" - #elseif os(Linux) - return "Linux" - #else - return "Unknown" - #endif - }() - - return "\(osName) \(versionString)" - }() - - let alamofireVersion: String = { - guard - let afInfo = NSBundle(forClass: Manager.self).infoDictionary, - build = afInfo["CFBundleShortVersionString"] - else { return "Unknown" } - - return "Alamofire/\(build)" - }() - - return "\(executable)/\(appVersion) (\(bundle); build:\(appBuild); \(osNameVersion)) \(alamofireVersion)" - } - - return "Alamofire" - }() - - return [ - "Accept-Encoding": acceptEncoding, - "Accept-Language": acceptLanguage, - "User-Agent": userAgent - ] - }() - - let queue = dispatch_queue_create(nil, DISPATCH_QUEUE_SERIAL) - - /// The underlying session. - public let session: NSURLSession - - /// The session delegate handling all the task and session delegate callbacks. - public let delegate: SessionDelegate - - /// Whether to start requests immediately after being constructed. `true` by default. - public var startRequestsImmediately: Bool = true - - /** - The background completion handler closure provided by the UIApplicationDelegate - `application:handleEventsForBackgroundURLSession:completionHandler:` method. By setting the background - completion handler, the SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` closure implementation - will automatically call the handler. - - If you need to handle your own events before the handler is called, then you need to override the - SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` and manually call the handler when finished. - - `nil` by default. - */ - public var backgroundCompletionHandler: (() -> Void)? - - // MARK: - Lifecycle - - /** - Initializes the `Manager` instance with the specified configuration, delegate and server trust policy. - - - parameter configuration: The configuration used to construct the managed session. - `NSURLSessionConfiguration.defaultSessionConfiguration()` by default. - - parameter delegate: The delegate used when initializing the session. `SessionDelegate()` by - default. - - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust - challenges. `nil` by default. - - - returns: The new `Manager` instance. - */ - public init( - configuration: NSURLSessionConfiguration = NSURLSessionConfiguration.defaultSessionConfiguration(), - delegate: SessionDelegate = SessionDelegate(), - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { - self.delegate = delegate - self.session = NSURLSession(configuration: configuration, delegate: delegate, delegateQueue: nil) - - commonInit(serverTrustPolicyManager: serverTrustPolicyManager) - } - - /** - Initializes the `Manager` instance with the specified session, delegate and server trust policy. - - - parameter session: The URL session. - - parameter delegate: The delegate of the URL session. Must equal the URL session's delegate. - - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust - challenges. `nil` by default. - - - returns: The new `Manager` instance if the URL session's delegate matches the delegate parameter. - */ - public init?( - session: NSURLSession, - delegate: SessionDelegate, - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { - guard delegate === session.delegate else { return nil } - - self.delegate = delegate - self.session = session - - commonInit(serverTrustPolicyManager: serverTrustPolicyManager) - } - - private func commonInit(serverTrustPolicyManager serverTrustPolicyManager: ServerTrustPolicyManager?) { - session.serverTrustPolicyManager = serverTrustPolicyManager - - delegate.sessionDidFinishEventsForBackgroundURLSession = { [weak self] session in - guard let strongSelf = self else { return } - dispatch_async(dispatch_get_main_queue()) { strongSelf.backgroundCompletionHandler?() } - } - } - - deinit { - session.invalidateAndCancel() - } - - // MARK: - Request - - /** - Creates a request for the specified method, URL string, parameters, parameter encoding and headers. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter parameters: The parameters. `nil` by default. - - parameter encoding: The parameter encoding. `.URL` by default. - - parameter headers: The HTTP headers. `nil` by default. - - - returns: The created request. - */ - public func request( - method: Method, - _ URLString: URLStringConvertible, - parameters: [String: AnyObject]? = nil, - encoding: ParameterEncoding = .URL, - headers: [String: String]? = nil) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - let encodedURLRequest = encoding.encode(mutableURLRequest, parameters: parameters).0 - return request(encodedURLRequest) - } - - /** - Creates a request for the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request - - - returns: The created request. - */ - public func request(URLRequest: URLRequestConvertible) -> Request { - var dataTask: NSURLSessionDataTask! - dispatch_sync(queue) { dataTask = self.session.dataTaskWithRequest(URLRequest.URLRequest) } - - let request = Request(session: session, task: dataTask) - delegate[request.delegate.task] = request.delegate - - if startRequestsImmediately { - request.resume() - } - - return request - } - - // MARK: - SessionDelegate - - /** - Responsible for handling all delegate callbacks for the underlying session. - */ - public class SessionDelegate: NSObject, NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate { - private var subdelegates: [Int: Request.TaskDelegate] = [:] - private let subdelegateQueue = dispatch_queue_create(nil, DISPATCH_QUEUE_CONCURRENT) - - /// Access the task delegate for the specified task in a thread-safe manner. - public subscript(task: NSURLSessionTask) -> Request.TaskDelegate? { - get { - var subdelegate: Request.TaskDelegate? - dispatch_sync(subdelegateQueue) { subdelegate = self.subdelegates[task.taskIdentifier] } - - return subdelegate - } - set { - dispatch_barrier_async(subdelegateQueue) { self.subdelegates[task.taskIdentifier] = newValue } - } - } - - /** - Initializes the `SessionDelegate` instance. - - - returns: The new `SessionDelegate` instance. - */ - public override init() { - super.init() - } - - // MARK: - NSURLSessionDelegate - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionDelegate method `URLSession:didBecomeInvalidWithError:`. - public var sessionDidBecomeInvalidWithError: ((NSURLSession, NSError?) -> Void)? - - /// Overrides default behavior for NSURLSessionDelegate method `URLSession:didReceiveChallenge:completionHandler:`. - public var sessionDidReceiveChallenge: ((NSURLSession, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? - - /// Overrides all behavior for NSURLSessionDelegate method `URLSession:didReceiveChallenge:completionHandler:` and requires the caller to call the `completionHandler`. - public var sessionDidReceiveChallengeWithCompletion: ((NSURLSession, NSURLAuthenticationChallenge, (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void) -> Void)? - - /// Overrides default behavior for NSURLSessionDelegate method `URLSessionDidFinishEventsForBackgroundURLSession:`. - public var sessionDidFinishEventsForBackgroundURLSession: ((NSURLSession) -> Void)? - - // MARK: Delegate Methods - - /** - Tells the delegate that the session has been invalidated. - - - parameter session: The session object that was invalidated. - - parameter error: The error that caused invalidation, or nil if the invalidation was explicit. - */ - public func URLSession(session: NSURLSession, didBecomeInvalidWithError error: NSError?) { - sessionDidBecomeInvalidWithError?(session, error) - } - - /** - Requests credentials from the delegate in response to a session-level authentication request from the remote server. - - - parameter session: The session containing the task that requested authentication. - - parameter challenge: An object that contains the request for authentication. - - parameter completionHandler: A handler that your delegate method must call providing the disposition and credential. - */ - public func URLSession( - session: NSURLSession, - didReceiveChallenge challenge: NSURLAuthenticationChallenge, - completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) - { - guard sessionDidReceiveChallengeWithCompletion == nil else { - sessionDidReceiveChallengeWithCompletion?(session, challenge, completionHandler) - return - } - - var disposition: NSURLSessionAuthChallengeDisposition = .PerformDefaultHandling - var credential: NSURLCredential? - - if let sessionDidReceiveChallenge = sessionDidReceiveChallenge { - (disposition, credential) = sessionDidReceiveChallenge(session, challenge) - } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - let host = challenge.protectionSpace.host - - if let - serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicyForHost(host), - serverTrust = challenge.protectionSpace.serverTrust - { - if serverTrustPolicy.evaluateServerTrust(serverTrust, isValidForHost: host) { - disposition = .UseCredential - credential = NSURLCredential(forTrust: serverTrust) - } else { - disposition = .CancelAuthenticationChallenge - } - } - } - - completionHandler(disposition, credential) - } - - /** - Tells the delegate that all messages enqueued for a session have been delivered. - - - parameter session: The session that no longer has any outstanding requests. - */ - public func URLSessionDidFinishEventsForBackgroundURLSession(session: NSURLSession) { - sessionDidFinishEventsForBackgroundURLSession?(session) - } - - // MARK: - NSURLSessionTaskDelegate - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:`. - public var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> NSURLRequest?)? - - /// Overrides all behavior for NSURLSessionTaskDelegate method `URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:` and - /// requires the caller to call the `completionHandler`. - public var taskWillPerformHTTPRedirectionWithCompletion: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest, NSURLRequest? -> Void) -> Void)? - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didReceiveChallenge:completionHandler:`. - public var taskDidReceiveChallenge: ((NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? - - /// Overrides all behavior for NSURLSessionTaskDelegate method `URLSession:task:didReceiveChallenge:completionHandler:` and - /// requires the caller to call the `completionHandler`. - public var taskDidReceiveChallengeWithCompletion: ((NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void) -> Void)? - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:session:task:needNewBodyStream:`. - public var taskNeedNewBodyStream: ((NSURLSession, NSURLSessionTask) -> NSInputStream?)? - - /// Overrides all behavior for NSURLSessionTaskDelegate method `URLSession:session:task:needNewBodyStream:` and - /// requires the caller to call the `completionHandler`. - public var taskNeedNewBodyStreamWithCompletion: ((NSURLSession, NSURLSessionTask, NSInputStream? -> Void) -> Void)? - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`. - public var taskDidSendBodyData: ((NSURLSession, NSURLSessionTask, Int64, Int64, Int64) -> Void)? - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didCompleteWithError:`. - public var taskDidComplete: ((NSURLSession, NSURLSessionTask, NSError?) -> Void)? - - // MARK: Delegate Methods - - /** - Tells the delegate that the remote server requested an HTTP redirect. - - - parameter session: The session containing the task whose request resulted in a redirect. - - parameter task: The task whose request resulted in a redirect. - - parameter response: An object containing the server’s response to the original request. - - parameter request: A URL request object filled out with the new location. - - parameter completionHandler: A closure that your handler should call with either the value of the request - parameter, a modified URL request object, or NULL to refuse the redirect and - return the body of the redirect response. - */ - public func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - willPerformHTTPRedirection response: NSHTTPURLResponse, - newRequest request: NSURLRequest, - completionHandler: NSURLRequest? -> Void) - { - guard taskWillPerformHTTPRedirectionWithCompletion == nil else { - taskWillPerformHTTPRedirectionWithCompletion?(session, task, response, request, completionHandler) - return - } - - var redirectRequest: NSURLRequest? = request - - if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { - redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) - } - - completionHandler(redirectRequest) - } - - /** - Requests credentials from the delegate in response to an authentication request from the remote server. - - - parameter session: The session containing the task whose request requires authentication. - - parameter task: The task whose request requires authentication. - - parameter challenge: An object that contains the request for authentication. - - parameter completionHandler: A handler that your delegate method must call providing the disposition and credential. - */ - public func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - didReceiveChallenge challenge: NSURLAuthenticationChallenge, - completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void) - { - guard taskDidReceiveChallengeWithCompletion == nil else { - taskDidReceiveChallengeWithCompletion?(session, task, challenge, completionHandler) - return - } - - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - let result = taskDidReceiveChallenge(session, task, challenge) - completionHandler(result.0, result.1) - } else if let delegate = self[task] { - delegate.URLSession( - session, - task: task, - didReceiveChallenge: challenge, - completionHandler: completionHandler - ) - } else { - URLSession(session, didReceiveChallenge: challenge, completionHandler: completionHandler) - } - } - - /** - Tells the delegate when a task requires a new request body stream to send to the remote server. - - - parameter session: The session containing the task that needs a new body stream. - - parameter task: The task that needs a new body stream. - - parameter completionHandler: A completion handler that your delegate method should call with the new body stream. - */ - public func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - needNewBodyStream completionHandler: NSInputStream? -> Void) - { - guard taskNeedNewBodyStreamWithCompletion == nil else { - taskNeedNewBodyStreamWithCompletion?(session, task, completionHandler) - return - } - - if let taskNeedNewBodyStream = taskNeedNewBodyStream { - completionHandler(taskNeedNewBodyStream(session, task)) - } else if let delegate = self[task] { - delegate.URLSession(session, task: task, needNewBodyStream: completionHandler) - } - } - - /** - Periodically informs the delegate of the progress of sending body content to the server. - - - parameter session: The session containing the data task. - - parameter task: The data task. - - parameter bytesSent: The number of bytes sent since the last time this delegate method was called. - - parameter totalBytesSent: The total number of bytes sent so far. - - parameter totalBytesExpectedToSend: The expected length of the body data. - */ - public func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { - if let taskDidSendBodyData = taskDidSendBodyData { - taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } else if let delegate = self[task] as? Request.UploadTaskDelegate { - delegate.URLSession( - session, - task: task, - didSendBodyData: bytesSent, - totalBytesSent: totalBytesSent, - totalBytesExpectedToSend: totalBytesExpectedToSend - ) - } - } - - /** - Tells the delegate that the task finished transferring data. - - - parameter session: The session containing the task whose request finished transferring data. - - parameter task: The task whose request finished transferring data. - - parameter error: If an error occurred, an error object indicating how the transfer failed, otherwise nil. - */ - public func URLSession(session: NSURLSession, task: NSURLSessionTask, didCompleteWithError error: NSError?) { - if let taskDidComplete = taskDidComplete { - taskDidComplete(session, task, error) - } else if let delegate = self[task] { - delegate.URLSession(session, task: task, didCompleteWithError: error) - } - - NSNotificationCenter.defaultCenter().postNotificationName(Notifications.Task.DidComplete, object: task) - - self[task] = nil - } - - // MARK: - NSURLSessionDataDelegate - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didReceiveResponse:completionHandler:`. - public var dataTaskDidReceiveResponse: ((NSURLSession, NSURLSessionDataTask, NSURLResponse) -> NSURLSessionResponseDisposition)? - - /// Overrides all behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didReceiveResponse:completionHandler:` and - /// requires caller to call the `completionHandler`. - public var dataTaskDidReceiveResponseWithCompletion: ((NSURLSession, NSURLSessionDataTask, NSURLResponse, NSURLSessionResponseDisposition -> Void) -> Void)? - - /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didBecomeDownloadTask:`. - public var dataTaskDidBecomeDownloadTask: ((NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) -> Void)? - - /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didReceiveData:`. - public var dataTaskDidReceiveData: ((NSURLSession, NSURLSessionDataTask, NSData) -> Void)? - - /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:willCacheResponse:completionHandler:`. - public var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> NSCachedURLResponse?)? - - /// Overrides all behavior for NSURLSessionDataDelegate method `URLSession:dataTask:willCacheResponse:completionHandler:` and - /// requires caller to call the `completionHandler`. - public var dataTaskWillCacheResponseWithCompletion: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, NSCachedURLResponse? -> Void) -> Void)? - - // MARK: Delegate Methods - - /** - Tells the delegate that the data task received the initial reply (headers) from the server. - - - parameter session: The session containing the data task that received an initial reply. - - parameter dataTask: The data task that received an initial reply. - - parameter response: A URL response object populated with headers. - - parameter completionHandler: A completion handler that your code calls to continue the transfer, passing a - constant to indicate whether the transfer should continue as a data task or - should become a download task. - */ - public func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - didReceiveResponse response: NSURLResponse, - completionHandler: NSURLSessionResponseDisposition -> Void) - { - guard dataTaskDidReceiveResponseWithCompletion == nil else { - dataTaskDidReceiveResponseWithCompletion?(session, dataTask, response, completionHandler) - return - } - - var disposition: NSURLSessionResponseDisposition = .Allow - - if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { - disposition = dataTaskDidReceiveResponse(session, dataTask, response) - } - - completionHandler(disposition) - } - - /** - Tells the delegate that the data task was changed to a download task. - - - parameter session: The session containing the task that was replaced by a download task. - - parameter dataTask: The data task that was replaced by a download task. - - parameter downloadTask: The new download task that replaced the data task. - */ - public func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - didBecomeDownloadTask downloadTask: NSURLSessionDownloadTask) - { - if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask { - dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask) - } else { - let downloadDelegate = Request.DownloadTaskDelegate(task: downloadTask) - self[downloadTask] = downloadDelegate - } - } - - /** - Tells the delegate that the data task has received some of the expected data. - - - parameter session: The session containing the data task that provided data. - - parameter dataTask: The data task that provided data. - - parameter data: A data object containing the transferred data. - */ - public func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveData data: NSData) { - if let dataTaskDidReceiveData = dataTaskDidReceiveData { - dataTaskDidReceiveData(session, dataTask, data) - } else if let delegate = self[dataTask] as? Request.DataTaskDelegate { - delegate.URLSession(session, dataTask: dataTask, didReceiveData: data) - } - } - - /** - Asks the delegate whether the data (or upload) task should store the response in the cache. - - - parameter session: The session containing the data (or upload) task. - - parameter dataTask: The data (or upload) task. - - parameter proposedResponse: The default caching behavior. This behavior is determined based on the current - caching policy and the values of certain received headers, such as the Pragma - and Cache-Control headers. - - parameter completionHandler: A block that your handler must call, providing either the original proposed - response, a modified version of that response, or NULL to prevent caching the - response. If your delegate implements this method, it must call this completion - handler; otherwise, your app leaks memory. - */ - public func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - willCacheResponse proposedResponse: NSCachedURLResponse, - completionHandler: NSCachedURLResponse? -> Void) - { - guard dataTaskWillCacheResponseWithCompletion == nil else { - dataTaskWillCacheResponseWithCompletion?(session, dataTask, proposedResponse, completionHandler) - return - } - - if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { - completionHandler(dataTaskWillCacheResponse(session, dataTask, proposedResponse)) - } else if let delegate = self[dataTask] as? Request.DataTaskDelegate { - delegate.URLSession( - session, - dataTask: dataTask, - willCacheResponse: proposedResponse, - completionHandler: completionHandler - ) - } else { - completionHandler(proposedResponse) - } - } - - // MARK: - NSURLSessionDownloadDelegate - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionDownloadDelegate method `URLSession:downloadTask:didFinishDownloadingToURL:`. - public var downloadTaskDidFinishDownloadingToURL: ((NSURLSession, NSURLSessionDownloadTask, NSURL) -> Void)? - - /// Overrides default behavior for NSURLSessionDownloadDelegate method `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:`. - public var downloadTaskDidWriteData: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64, Int64) -> Void)? - - /// Overrides default behavior for NSURLSessionDownloadDelegate method `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`. - public var downloadTaskDidResumeAtOffset: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64) -> Void)? - - // MARK: Delegate Methods - - /** - Tells the delegate that a download task has finished downloading. - - - parameter session: The session containing the download task that finished. - - parameter downloadTask: The download task that finished. - - parameter location: A file URL for the temporary file. Because the file is temporary, you must either - open the file for reading or move it to a permanent location in your app’s sandbox - container directory before returning from this delegate method. - */ - public func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didFinishDownloadingToURL location: NSURL) - { - if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { - downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) - } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { - delegate.URLSession(session, downloadTask: downloadTask, didFinishDownloadingToURL: location) - } - } - - /** - Periodically informs the delegate about the download’s progress. - - - parameter session: The session containing the download task. - - parameter downloadTask: The download task. - - parameter bytesWritten: The number of bytes transferred since the last time this delegate - method was called. - - parameter totalBytesWritten: The total number of bytes transferred so far. - - parameter totalBytesExpectedToWrite: The expected length of the file, as provided by the Content-Length - header. If this header was not provided, the value is - `NSURLSessionTransferSizeUnknown`. - */ - public func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { - if let downloadTaskDidWriteData = downloadTaskDidWriteData { - downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) - } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { - delegate.URLSession( - session, - downloadTask: downloadTask, - didWriteData: bytesWritten, - totalBytesWritten: totalBytesWritten, - totalBytesExpectedToWrite: totalBytesExpectedToWrite - ) - } - } - - /** - Tells the delegate that the download task has resumed downloading. - - - parameter session: The session containing the download task that finished. - - parameter downloadTask: The download task that resumed. See explanation in the discussion. - - parameter fileOffset: If the file's cache policy or last modified date prevents reuse of the - existing content, then this value is zero. Otherwise, this value is an - integer representing the number of bytes on disk that do not need to be - retrieved again. - - parameter expectedTotalBytes: The expected length of the file, as provided by the Content-Length header. - If this header was not provided, the value is NSURLSessionTransferSizeUnknown. - */ - public func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { - if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { - downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) - } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { - delegate.URLSession( - session, - downloadTask: downloadTask, - didResumeAtOffset: fileOffset, - expectedTotalBytes: expectedTotalBytes - ) - } - } - - // MARK: - NSURLSessionStreamDelegate - - var _streamTaskReadClosed: Any? - var _streamTaskWriteClosed: Any? - var _streamTaskBetterRouteDiscovered: Any? - var _streamTaskDidBecomeInputStream: Any? - - // MARK: - NSObject - - public override func respondsToSelector(selector: Selector) -> Bool { - #if !os(OSX) - if selector == #selector(NSURLSessionDelegate.URLSessionDidFinishEventsForBackgroundURLSession(_:)) { - return sessionDidFinishEventsForBackgroundURLSession != nil - } - #endif - - switch selector { - case #selector(NSURLSessionDelegate.URLSession(_:didBecomeInvalidWithError:)): - return sessionDidBecomeInvalidWithError != nil - case #selector(NSURLSessionDelegate.URLSession(_:didReceiveChallenge:completionHandler:)): - return (sessionDidReceiveChallenge != nil || sessionDidReceiveChallengeWithCompletion != nil) - case #selector(NSURLSessionTaskDelegate.URLSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)): - return (taskWillPerformHTTPRedirection != nil || taskWillPerformHTTPRedirectionWithCompletion != nil) - case #selector(NSURLSessionDataDelegate.URLSession(_:dataTask:didReceiveResponse:completionHandler:)): - return (dataTaskDidReceiveResponse != nil || dataTaskDidReceiveResponseWithCompletion != nil) - default: - return self.dynamicType.instancesRespondToSelector(selector) - } - } - } -} diff --git a/Pods/Alamofire/Source/MultipartFormData.swift b/Pods/Alamofire/Source/MultipartFormData.swift index 5a7ef09..35a4d1f 100644 --- a/Pods/Alamofire/Source/MultipartFormData.swift +++ b/Pods/Alamofire/Source/MultipartFormData.swift @@ -30,61 +30,59 @@ import MobileCoreServices import CoreServices #endif -/** - Constructs `multipart/form-data` for uploads within an HTTP or HTTPS body. There are currently two ways to encode - multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead - to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the - data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for - larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset. - - For more information on `multipart/form-data` in general, please refer to the RFC-2388 and RFC-2045 specs as well - and the w3 form documentation. - - - https://www.ietf.org/rfc/rfc2388.txt - - https://www.ietf.org/rfc/rfc2045.txt - - https://www.w3.org/TR/html401/interact/forms.html#h-17.13 -*/ -public class MultipartFormData { +/// Constructs `multipart/form-data` for uploads within an HTTP or HTTPS body. There are currently two ways to encode +/// multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead +/// to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the +/// data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for +/// larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset. +/// +/// For more information on `multipart/form-data` in general, please refer to the RFC-2388 and RFC-2045 specs as well +/// and the w3 form documentation. +/// +/// - https://www.ietf.org/rfc/rfc2388.txt +/// - https://www.ietf.org/rfc/rfc2045.txt +/// - https://www.w3.org/TR/html401/interact/forms.html#h-17.13 +open class MultipartFormData { // MARK: - Helper Types struct EncodingCharacters { - static let CRLF = "\r\n" + static let crlf = "\r\n" } struct BoundaryGenerator { enum BoundaryType { - case Initial, Encapsulated, Final + case initial, encapsulated, final } static func randomBoundary() -> String { return String(format: "alamofire.boundary.%08x%08x", arc4random(), arc4random()) } - static func boundaryData(boundaryType boundaryType: BoundaryType, boundary: String) -> NSData { + static func boundaryData(forBoundaryType boundaryType: BoundaryType, boundary: String) -> Data { let boundaryText: String switch boundaryType { - case .Initial: - boundaryText = "--\(boundary)\(EncodingCharacters.CRLF)" - case .Encapsulated: - boundaryText = "\(EncodingCharacters.CRLF)--\(boundary)\(EncodingCharacters.CRLF)" - case .Final: - boundaryText = "\(EncodingCharacters.CRLF)--\(boundary)--\(EncodingCharacters.CRLF)" + case .initial: + boundaryText = "--\(boundary)\(EncodingCharacters.crlf)" + case .encapsulated: + boundaryText = "\(EncodingCharacters.crlf)--\(boundary)\(EncodingCharacters.crlf)" + case .final: + boundaryText = "\(EncodingCharacters.crlf)--\(boundary)--\(EncodingCharacters.crlf)" } - return boundaryText.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)! + return boundaryText.data(using: String.Encoding.utf8, allowLossyConversion: false)! } } class BodyPart { - let headers: [String: String] - let bodyStream: NSInputStream + let headers: HTTPHeaders + let bodyStream: InputStream let bodyContentLength: UInt64 var hasInitialBoundary = false var hasFinalBoundary = false - init(headers: [String: String], bodyStream: NSInputStream, bodyContentLength: UInt64) { + init(headers: HTTPHeaders, bodyStream: InputStream, bodyContentLength: UInt64) { self.headers = headers self.bodyStream = bodyStream self.bodyContentLength = bodyContentLength @@ -94,7 +92,7 @@ public class MultipartFormData { // MARK: - Properties /// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`. - public var contentType: String { return "multipart/form-data; boundary=\(boundary)" } + open var contentType: String { return "multipart/form-data; boundary=\(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 } } @@ -103,151 +101,137 @@ public class MultipartFormData { public let boundary: String private var bodyParts: [BodyPart] - private var bodyPartError: NSError? + private var bodyPartError: AFError? private let streamBufferSize: Int // MARK: - Lifecycle - /** - Creates a multipart form data object. - - - returns: The multipart form data object. - */ + /// Creates a multipart form data object. + /// + /// - returns: The multipart form data object. public init() { self.boundary = BoundaryGenerator.randomBoundary() self.bodyParts = [] - /** - * The optimal read/write buffer size in bytes for input and output streams is 1024 (1KB). For more - * information, please refer to the following article: - * - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/ReadingInputStreams.html - */ + /// + /// The optimal read/write buffer size in bytes for input and output streams is 1024 (1KB). For more + /// information, please refer to the following article: + /// - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/ReadingInputStreams.html + /// self.streamBufferSize = 1024 } // MARK: - Body Parts - /** - Creates a body part from the data and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}` (HTTP Header) - - Encoded data - - Multipart form boundary - - - parameter data: The data to encode into the multipart form data. - - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - */ - public func appendBodyPart(data data: NSData, name: String) { - let headers = contentHeaders(name: name) - let stream = NSInputStream(data: data) - let length = UInt64(data.length) - - appendBodyPart(stream: stream, length: length, headers: headers) + /// Creates a body part from the data and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - `Content-Disposition: form-data; name=#{name}` (HTTP Header) + /// - Encoded data + /// - Multipart form boundary + /// + /// - parameter data: The data to encode into the multipart form data. + /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. + public func append(_ data: Data, withName name: String) { + let headers = contentHeaders(withName: name) + let stream = InputStream(data: data) + let length = UInt64(data.count) + + append(stream, withLength: length, headers: headers) } - /** - Creates a body part from the data and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}` (HTTP Header) - - `Content-Type: #{generated mimeType}` (HTTP Header) - - Encoded data - - Multipart form boundary - - - parameter data: The data to encode into the multipart form data. - - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - - parameter mimeType: The MIME type to associate with the data content type in the `Content-Type` HTTP header. - */ - public func appendBodyPart(data data: NSData, name: String, mimeType: String) { - let headers = contentHeaders(name: name, mimeType: mimeType) - let stream = NSInputStream(data: data) - let length = UInt64(data.length) - - appendBodyPart(stream: stream, length: length, headers: headers) + /// Creates a body part from the data and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - `Content-Disposition: form-data; name=#{name}` (HTTP Header) + /// - `Content-Type: #{generated mimeType}` (HTTP Header) + /// - Encoded data + /// - Multipart form boundary + /// + /// - parameter data: The data to encode into the multipart form data. + /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. + /// - parameter mimeType: The MIME type to associate with the data content type in the `Content-Type` HTTP header. + public func append(_ data: Data, withName name: String, mimeType: String) { + let headers = contentHeaders(withName: name, mimeType: mimeType) + let stream = InputStream(data: data) + let length = UInt64(data.count) + + append(stream, withLength: length, headers: headers) } - /** - Creates a body part from the data and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - - `Content-Type: #{mimeType}` (HTTP Header) - - Encoded file data - - Multipart form boundary - - - parameter data: The data to encode into the multipart form data. - - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - - parameter fileName: The filename to associate with the data in the `Content-Disposition` HTTP header. - - parameter mimeType: The MIME type to associate with the data in the `Content-Type` HTTP header. - */ - public func appendBodyPart(data data: NSData, name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(name: name, fileName: fileName, mimeType: mimeType) - let stream = NSInputStream(data: data) - let length = UInt64(data.length) - - appendBodyPart(stream: stream, length: length, headers: headers) + /// Creates a body part from the data and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) + /// - `Content-Type: #{mimeType}` (HTTP Header) + /// - Encoded file data + /// - Multipart form boundary + /// + /// - parameter data: The data to encode into the multipart form data. + /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. + /// - parameter fileName: The filename to associate with the data in the `Content-Disposition` HTTP header. + /// - parameter mimeType: The MIME type to associate with the data in the `Content-Type` HTTP header. + public func append(_ data: Data, withName name: String, fileName: String, mimeType: String) { + let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) + let stream = InputStream(data: data) + let length = UInt64(data.count) + + append(stream, withLength: length, headers: headers) } - /** - Creates a body part from the file and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}; filename=#{generated filename}` (HTTP Header) - - `Content-Type: #{generated mimeType}` (HTTP Header) - - Encoded file data - - Multipart form boundary - - The filename in the `Content-Disposition` HTTP header is generated from the last path component of the - `fileURL`. The `Content-Type` HTTP header MIME type is generated by mapping the `fileURL` extension to the - system associated MIME type. - - - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. - - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. - */ - public func appendBodyPart(fileURL fileURL: NSURL, name: String) { - if let - fileName = fileURL.lastPathComponent, - pathExtension = fileURL.pathExtension - { - let mimeType = mimeTypeForPathExtension(pathExtension) - appendBodyPart(fileURL: fileURL, name: name, fileName: fileName, mimeType: mimeType) + /// Creates a body part from the file and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - `Content-Disposition: form-data; name=#{name}; filename=#{generated filename}` (HTTP Header) + /// - `Content-Type: #{generated mimeType}` (HTTP Header) + /// - Encoded file data + /// - Multipart form boundary + /// + /// The filename in the `Content-Disposition` HTTP header is generated from the last path component of the + /// `fileURL`. The `Content-Type` HTTP header MIME type is generated by mapping the `fileURL` extension to the + /// system associated MIME type. + /// + /// - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. + /// - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. + public func append(_ fileURL: URL, withName name: String) { + let fileName = fileURL.lastPathComponent + let pathExtension = fileURL.pathExtension + + if !fileName.isEmpty && !pathExtension.isEmpty { + let mime = mimeType(forPathExtension: pathExtension) + append(fileURL, withName: name, fileName: fileName, mimeType: mime) } else { - let failureReason = "Failed to extract the fileName of the provided URL: \(fileURL)" - setBodyPartError(code: NSURLErrorBadURL, failureReason: failureReason) + setBodyPartError(withReason: .bodyPartFilenameInvalid(in: fileURL)) } } - /** - Creates a body part from the file and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header) - - Content-Type: #{mimeType} (HTTP Header) - - Encoded file data - - Multipart form boundary - - - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. - - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. - - parameter fileName: The filename to associate with the file content in the `Content-Disposition` HTTP header. - - parameter mimeType: The MIME type to associate with the file content in the `Content-Type` HTTP header. - */ - public func appendBodyPart(fileURL fileURL: NSURL, name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(name: name, fileName: fileName, mimeType: mimeType) + /// Creates a body part from the file and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header) + /// - Content-Type: #{mimeType} (HTTP Header) + /// - Encoded file data + /// - Multipart form boundary + /// + /// - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. + /// - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. + /// - parameter fileName: The filename to associate with the file content in the `Content-Disposition` HTTP header. + /// - parameter mimeType: The MIME type to associate with the file content in the `Content-Type` HTTP header. + public func append(_ fileURL: URL, withName name: String, fileName: String, mimeType: String) { + let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) //============================================================ // Check 1 - is file URL? //============================================================ - guard fileURL.fileURL else { - let failureReason = "The file URL does not point to a file URL: \(fileURL)" - setBodyPartError(code: NSURLErrorBadURL, failureReason: failureReason) + guard fileURL.isFileURL else { + setBodyPartError(withReason: .bodyPartURLInvalid(url: fileURL)) return } @@ -255,14 +239,14 @@ public class MultipartFormData { // Check 2 - is file URL reachable? //============================================================ - var isReachable = true - - if #available(OSX 10.10, *) { - isReachable = fileURL.checkPromisedItemIsReachableAndReturnError(nil) - } - - guard isReachable else { - setBodyPartError(code: NSURLErrorBadURL, failureReason: "The file URL is not reachable: \(fileURL)") + do { + let isReachable = try fileURL.checkPromisedItemIsReachable() + guard isReachable else { + setBodyPartError(withReason: .bodyPartFileNotReachable(at: fileURL)) + return + } + } catch { + setBodyPartError(withReason: .bodyPartFileNotReachableWithError(atURL: fileURL, error: error)) return } @@ -271,13 +255,11 @@ public class MultipartFormData { //============================================================ var isDirectory: ObjCBool = false + let path = fileURL.path - guard let - path = fileURL.path - where NSFileManager.defaultManager().fileExistsAtPath(path, isDirectory: &isDirectory) && !isDirectory else + guard FileManager.default.fileExists(atPath: path, isDirectory: &isDirectory) && !isDirectory.boolValue else { - let failureReason = "The file URL is a directory, not a file: \(fileURL)" - setBodyPartError(code: NSURLErrorBadURL, failureReason: failureReason) + setBodyPartError(withReason: .bodyPartFileIsDirectory(at: fileURL)) return } @@ -285,22 +267,18 @@ public class MultipartFormData { // Check 4 - can the file size be extracted? //============================================================ - var bodyContentLength: UInt64? + let bodyContentLength: UInt64 do { - if let - path = fileURL.path, - fileSize = try NSFileManager.defaultManager().attributesOfItemAtPath(path)[NSFileSize] as? NSNumber - { - bodyContentLength = fileSize.unsignedLongLongValue + guard let fileSize = try FileManager.default.attributesOfItem(atPath: path)[.size] as? NSNumber else { + setBodyPartError(withReason: .bodyPartFileSizeNotAvailable(at: fileURL)) + return } - } catch { - // No-op - } - guard let length = bodyContentLength else { - let failureReason = "Could not fetch attributes from the file URL: \(fileURL)" - setBodyPartError(code: NSURLErrorBadURL, failureReason: failureReason) + bodyContentLength = fileSize.uint64Value + } + catch { + setBodyPartError(withReason: .bodyPartFileSizeQueryFailedWithError(forURL: fileURL, error: error)) return } @@ -308,236 +286,206 @@ public class MultipartFormData { // Check 5 - can a stream be created from file URL? //============================================================ - guard let stream = NSInputStream(URL: fileURL) else { - let failureReason = "Failed to create an input stream from the file URL: \(fileURL)" - setBodyPartError(code: NSURLErrorCannotOpenFile, failureReason: failureReason) + guard let stream = InputStream(url: fileURL) else { + setBodyPartError(withReason: .bodyPartInputStreamCreationFailed(for: fileURL)) return } - appendBodyPart(stream: stream, length: length, headers: headers) + append(stream, withLength: bodyContentLength, headers: headers) } - /** - Creates a body part from the stream and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - - `Content-Type: #{mimeType}` (HTTP Header) - - Encoded stream data - - Multipart form boundary - - - parameter stream: The input stream to encode in the multipart form data. - - parameter length: The content length of the stream. - - parameter name: The name to associate with the stream content in the `Content-Disposition` HTTP header. - - parameter fileName: The filename to associate with the stream content in the `Content-Disposition` HTTP header. - - parameter mimeType: The MIME type to associate with the stream content in the `Content-Type` HTTP header. - */ - public func appendBodyPart( - stream stream: NSInputStream, - length: UInt64, + /// Creates a body part from the stream and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) + /// - `Content-Type: #{mimeType}` (HTTP Header) + /// - Encoded stream data + /// - Multipart form boundary + /// + /// - parameter stream: The input stream to encode in the multipart form data. + /// - parameter length: The content length of the stream. + /// - parameter name: The name to associate with the stream content in the `Content-Disposition` HTTP header. + /// - parameter fileName: The filename to associate with the stream content in the `Content-Disposition` HTTP header. + /// - parameter mimeType: The MIME type to associate with the stream content in the `Content-Type` HTTP header. + public func append( + _ stream: InputStream, + withLength length: UInt64, name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(name: name, fileName: fileName, mimeType: mimeType) - appendBodyPart(stream: stream, length: length, headers: headers) + let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) + append(stream, withLength: length, headers: headers) } - /** - Creates a body part with the headers, stream and length and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - HTTP headers - - Encoded stream data - - Multipart form boundary - - - parameter stream: The input stream to encode in the multipart form data. - - parameter length: The content length of the stream. - - parameter headers: The HTTP headers for the body part. - */ - public func appendBodyPart(stream stream: NSInputStream, length: UInt64, headers: [String: String]) { + /// Creates a body part with the headers, stream and length and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - HTTP headers + /// - Encoded stream data + /// - Multipart form boundary + /// + /// - parameter stream: The input stream to encode in the multipart form data. + /// - parameter length: The content length of the stream. + /// - parameter headers: The HTTP headers for the body part. + public func append(_ stream: InputStream, withLength length: UInt64, headers: HTTPHeaders) { let bodyPart = BodyPart(headers: headers, bodyStream: stream, bodyContentLength: length) bodyParts.append(bodyPart) } // MARK: - Data Encoding - /** - Encodes all the appended body parts into a single `NSData` object. - - It is important to note that this method will load all the appended body parts into memory all at the same - time. This method should only be used when the encoded data will have a small memory footprint. For large data - cases, please use the `writeEncodedDataToDisk(fileURL:completionHandler:)` method. - - - throws: An `NSError` if encoding encounters an error. - - - returns: The encoded `NSData` if encoding is successful. - */ - public func encode() throws -> NSData { + /// Encodes all the appended body parts into a single `Data` value. + /// + /// It is important to note that this method will load all the appended body parts into memory all at the same + /// time. This method should only be used when the encoded data will have a small memory footprint. For large data + /// cases, please use the `writeEncodedDataToDisk(fileURL:completionHandler:)` method. + /// + /// - throws: An `AFError` if encoding encounters an error. + /// + /// - returns: The encoded `Data` if encoding is successful. + public func encode() throws -> Data { if let bodyPartError = bodyPartError { throw bodyPartError } - let encoded = NSMutableData() + var encoded = Data() bodyParts.first?.hasInitialBoundary = true bodyParts.last?.hasFinalBoundary = true for bodyPart in bodyParts { - let encodedData = try encodeBodyPart(bodyPart) - encoded.appendData(encodedData) + let encodedData = try encode(bodyPart) + encoded.append(encodedData) } return encoded } - /** - Writes the appended body parts into the given file URL. - - This process is facilitated by reading and writing with input and output streams, respectively. Thus, - this approach is very memory efficient and should be used for large body part data. - - - parameter fileURL: The file URL to write the multipart form data into. - - - throws: An `NSError` if encoding encounters an error. - */ - public func writeEncodedDataToDisk(fileURL: NSURL) throws { + /// Writes the appended body parts into the given file URL. + /// + /// This process is facilitated by reading and writing with input and output streams, respectively. Thus, + /// this approach is very memory efficient and should be used for large body part data. + /// + /// - parameter fileURL: The file URL to write the multipart form data into. + /// + /// - throws: An `AFError` if encoding encounters an error. + public func writeEncodedData(to fileURL: URL) throws { if let bodyPartError = bodyPartError { throw bodyPartError } - if let path = fileURL.path where NSFileManager.defaultManager().fileExistsAtPath(path) { - let failureReason = "A file already exists at the given file URL: \(fileURL)" - throw Error.error(domain: NSURLErrorDomain, code: NSURLErrorBadURL, failureReason: failureReason) - } else if !fileURL.fileURL { - let failureReason = "The URL does not point to a valid file: \(fileURL)" - throw Error.error(domain: NSURLErrorDomain, code: NSURLErrorBadURL, failureReason: failureReason) + if FileManager.default.fileExists(atPath: fileURL.path) { + throw AFError.multipartEncodingFailed(reason: .outputStreamFileAlreadyExists(at: fileURL)) + } else if !fileURL.isFileURL { + throw AFError.multipartEncodingFailed(reason: .outputStreamURLInvalid(url: fileURL)) } - let outputStream: NSOutputStream - - if let possibleOutputStream = NSOutputStream(URL: fileURL, append: false) { - outputStream = possibleOutputStream - } else { - let failureReason = "Failed to create an output stream with the given URL: \(fileURL)" - throw Error.error(domain: NSURLErrorDomain, code: NSURLErrorCannotOpenFile, failureReason: failureReason) + guard let outputStream = OutputStream(url: fileURL, append: false) else { + throw AFError.multipartEncodingFailed(reason: .outputStreamCreationFailed(for: fileURL)) } outputStream.open() + defer { outputStream.close() } self.bodyParts.first?.hasInitialBoundary = true self.bodyParts.last?.hasFinalBoundary = true for bodyPart in self.bodyParts { - try writeBodyPart(bodyPart, toOutputStream: outputStream) + try write(bodyPart, to: outputStream) } - - outputStream.close() } // MARK: - Private - Body Part Encoding - private func encodeBodyPart(bodyPart: BodyPart) throws -> NSData { - let encoded = NSMutableData() + private func encode(_ bodyPart: BodyPart) throws -> Data { + var encoded = Data() let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - encoded.appendData(initialData) + encoded.append(initialData) - let headerData = encodeHeaderDataForBodyPart(bodyPart) - encoded.appendData(headerData) + let headerData = encodeHeaders(for: bodyPart) + encoded.append(headerData) - let bodyStreamData = try encodeBodyStreamDataForBodyPart(bodyPart) - encoded.appendData(bodyStreamData) + let bodyStreamData = try encodeBodyStream(for: bodyPart) + encoded.append(bodyStreamData) if bodyPart.hasFinalBoundary { - encoded.appendData(finalBoundaryData()) + encoded.append(finalBoundaryData()) } return encoded } - private func encodeHeaderDataForBodyPart(bodyPart: BodyPart) -> NSData { + private func encodeHeaders(for bodyPart: BodyPart) -> Data { var headerText = "" for (key, value) in bodyPart.headers { - headerText += "\(key): \(value)\(EncodingCharacters.CRLF)" + headerText += "\(key): \(value)\(EncodingCharacters.crlf)" } - headerText += EncodingCharacters.CRLF + headerText += EncodingCharacters.crlf - return headerText.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)! + return headerText.data(using: String.Encoding.utf8, allowLossyConversion: false)! } - private func encodeBodyStreamDataForBodyPart(bodyPart: BodyPart) throws -> NSData { + private func encodeBodyStream(for bodyPart: BodyPart) throws -> Data { let inputStream = bodyPart.bodyStream inputStream.open() + defer { inputStream.close() } - var error: NSError? - let encoded = NSMutableData() + var encoded = Data() while inputStream.hasBytesAvailable { - var buffer = [UInt8](count: streamBufferSize, repeatedValue: 0) + var buffer = [UInt8](repeating: 0, count: streamBufferSize) let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) - if inputStream.streamError != nil { - error = inputStream.streamError - break + if let error = inputStream.streamError { + throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: error)) } if bytesRead > 0 { - encoded.appendBytes(buffer, length: bytesRead) - } else if bytesRead < 0 { - let failureReason = "Failed to read from input stream: \(inputStream)" - error = Error.error(domain: NSURLErrorDomain, code: .InputStreamReadFailed, failureReason: failureReason) - break + encoded.append(buffer, count: bytesRead) } else { break } } - inputStream.close() - - if let error = error { - throw error - } - return encoded } // MARK: - Private - Writing Body Part to Output Stream - private func writeBodyPart(bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) throws { - try writeInitialBoundaryDataForBodyPart(bodyPart, toOutputStream: outputStream) - try writeHeaderDataForBodyPart(bodyPart, toOutputStream: outputStream) - try writeBodyStreamForBodyPart(bodyPart, toOutputStream: outputStream) - try writeFinalBoundaryDataForBodyPart(bodyPart, toOutputStream: outputStream) + private func write(_ bodyPart: BodyPart, to outputStream: OutputStream) throws { + try writeInitialBoundaryData(for: bodyPart, to: outputStream) + try writeHeaderData(for: bodyPart, to: outputStream) + try writeBodyStream(for: bodyPart, to: outputStream) + try writeFinalBoundaryData(for: bodyPart, to: outputStream) } - private func writeInitialBoundaryDataForBodyPart( - bodyPart: BodyPart, - toOutputStream outputStream: NSOutputStream) - throws - { + private func writeInitialBoundaryData(for bodyPart: BodyPart, to outputStream: OutputStream) throws { let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - return try writeData(initialData, toOutputStream: outputStream) + return try write(initialData, to: outputStream) } - private func writeHeaderDataForBodyPart(bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) throws { - let headerData = encodeHeaderDataForBodyPart(bodyPart) - return try writeData(headerData, toOutputStream: outputStream) + private func writeHeaderData(for bodyPart: BodyPart, to outputStream: OutputStream) throws { + let headerData = encodeHeaders(for: bodyPart) + return try write(headerData, to: outputStream) } - private func writeBodyStreamForBodyPart(bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) throws { + private func writeBodyStream(for bodyPart: BodyPart, to outputStream: OutputStream) throws { let inputStream = bodyPart.bodyStream + inputStream.open() + defer { inputStream.close() } while inputStream.hasBytesAvailable { - var buffer = [UInt8](count: streamBufferSize, repeatedValue: 0) + var buffer = [UInt8](repeating: 0, count: streamBufferSize) let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) if let streamError = inputStream.streamError { - throw streamError + throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: streamError)) } if bytesRead > 0 { @@ -545,70 +493,52 @@ public class MultipartFormData { buffer = Array(buffer[0.. 0 { - if outputStream.hasSpaceAvailable { - let bytesWritten = outputStream.write(buffer, maxLength: bytesToWrite) + while bytesToWrite > 0, outputStream.hasSpaceAvailable { + let bytesWritten = outputStream.write(buffer, maxLength: bytesToWrite) - if let streamError = outputStream.streamError { - throw streamError - } - - if bytesWritten < 0 { - let failureReason = "Failed to write to output stream: \(outputStream)" - throw Error.error(domain: NSURLErrorDomain, code: .OutputStreamWriteFailed, failureReason: failureReason) - } + if let error = outputStream.streamError { + throw AFError.multipartEncodingFailed(reason: .outputStreamWriteFailed(error: error)) + } - bytesToWrite -= bytesWritten + bytesToWrite -= bytesWritten - if bytesToWrite > 0 { - buffer = Array(buffer[bytesWritten.. 0 { + buffer = Array(buffer[bytesWritten.. String { - if let - id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension, nil)?.takeRetainedValue(), - contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() + private func mimeType(forPathExtension pathExtension: String) -> String { + if + let id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as CFString, nil)?.takeRetainedValue(), + let contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() { return contentType as String } @@ -618,42 +548,34 @@ public class MultipartFormData { // MARK: - Private - Content Headers - private func contentHeaders(name name: String) -> [String: String] { - return ["Content-Disposition": "form-data; name=\"\(name)\""] - } + private func contentHeaders(withName name: String, fileName: String? = nil, mimeType: String? = nil) -> [String: String] { + var disposition = "form-data; name=\"\(name)\"" + if let fileName = fileName { disposition += "; filename=\"\(fileName)\"" } - private func contentHeaders(name name: String, mimeType: String) -> [String: String] { - return [ - "Content-Disposition": "form-data; name=\"\(name)\"", - "Content-Type": "\(mimeType)" - ] - } + var headers = ["Content-Disposition": disposition] + if let mimeType = mimeType { headers["Content-Type"] = mimeType } - private func contentHeaders(name name: String, fileName: String, mimeType: String) -> [String: String] { - return [ - "Content-Disposition": "form-data; name=\"\(name)\"; filename=\"\(fileName)\"", - "Content-Type": "\(mimeType)" - ] + return headers } // MARK: - Private - Boundary Encoding - private func initialBoundaryData() -> NSData { - return BoundaryGenerator.boundaryData(boundaryType: .Initial, boundary: boundary) + private func initialBoundaryData() -> Data { + return BoundaryGenerator.boundaryData(forBoundaryType: .initial, boundary: boundary) } - private func encapsulatedBoundaryData() -> NSData { - return BoundaryGenerator.boundaryData(boundaryType: .Encapsulated, boundary: boundary) + private func encapsulatedBoundaryData() -> Data { + return BoundaryGenerator.boundaryData(forBoundaryType: .encapsulated, boundary: boundary) } - private func finalBoundaryData() -> NSData { - return BoundaryGenerator.boundaryData(boundaryType: .Final, boundary: boundary) + private func finalBoundaryData() -> Data { + return BoundaryGenerator.boundaryData(forBoundaryType: .final, boundary: boundary) } // MARK: - Private - Errors - private func setBodyPartError(code code: Int, failureReason: String) { + private func setBodyPartError(withReason reason: AFError.MultipartEncodingFailureReason) { guard bodyPartError == nil else { return } - bodyPartError = Error.error(domain: NSURLErrorDomain, code: code, failureReason: failureReason) + bodyPartError = AFError.multipartEncodingFailed(reason: reason) } } diff --git a/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/Pods/Alamofire/Source/NetworkReachabilityManager.swift index d5e00ae..c06a60e 100644 --- a/Pods/Alamofire/Source/NetworkReachabilityManager.swift +++ b/Pods/Alamofire/Source/NetworkReachabilityManager.swift @@ -27,15 +27,13 @@ import Foundation import SystemConfiguration -/** - The `NetworkReachabilityManager` class listens for reachability changes of hosts and addresses for both WWAN and - WiFi network interfaces. - - Reachability can be used to determine background information about why a network operation failed, or to retry - network requests when a connection is established. It should not be used to prevent a user from initiating a network - request, as it's possible that an initial request may be required to establish reachability. -*/ -public class NetworkReachabilityManager { +/// The `NetworkReachabilityManager` class listens for reachability changes of hosts and addresses for both WWAN and +/// WiFi network interfaces. +/// +/// Reachability can be used to determine background information about why a network operation failed, or to retry +/// network requests when a connection is established. It should not be used to prevent a user from initiating a network +/// request, as it's possible that an initial request may be required to establish reachability. +open class NetworkReachabilityManager { /** Defines the various states of network reachability. @@ -44,49 +42,54 @@ public class NetworkReachabilityManager { - ReachableOnWWAN: The network is reachable over the WWAN connection. - ReachableOnWiFi: The network is reachable over the WiFi connection. */ + + + /// Defines the various states of network reachability. + /// + /// - unknown: It is unknown whether the network is reachable. + /// - notReachable: The network is not reachable. + /// - reachable: The network is reachable. public enum NetworkReachabilityStatus { - case Unknown - case NotReachable - case Reachable(ConnectionType) + case unknown + case notReachable + case reachable(ConnectionType) } - /** - Defines the various connection types detected by reachability flags. - - - EthernetOrWiFi: The connection type is either over Ethernet or WiFi. - - WWAN: The connection type is a WWAN connection. - */ + /// Defines the various connection types detected by reachability flags. + /// + /// - ethernetOrWiFi: The connection type is either over Ethernet or WiFi. + /// - wwan: The connection type is a WWAN connection. public enum ConnectionType { - case EthernetOrWiFi - case WWAN + case ethernetOrWiFi + case wwan } /// A closure executed when the network reachability status changes. The closure takes a single argument: the /// network reachability status. - public typealias Listener = NetworkReachabilityStatus -> Void + public typealias Listener = (NetworkReachabilityStatus) -> Void // MARK: - Properties /// Whether the network is currently reachable. - public var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi } + open var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi } /// Whether the network is currently reachable over the WWAN interface. - public var isReachableOnWWAN: Bool { return networkReachabilityStatus == .Reachable(.WWAN) } + open var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) } /// Whether the network is currently reachable over Ethernet or WiFi interface. - public var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .Reachable(.EthernetOrWiFi) } + open var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) } /// The current network reachability status. - public var networkReachabilityStatus: NetworkReachabilityStatus { - guard let flags = self.flags else { return .Unknown } + open var networkReachabilityStatus: NetworkReachabilityStatus { + guard let flags = self.flags else { return .unknown } return networkReachabilityStatusForFlags(flags) } /// The dispatch queue to execute the `listener` closure on. - public var listenerQueue: dispatch_queue_t = dispatch_get_main_queue() + open var listenerQueue: DispatchQueue = DispatchQueue.main /// A closure executed when the network reachability status changes. - public var listener: Listener? + open var listener: Listener? private var flags: SCNetworkReachabilityFlags? { var flags = SCNetworkReachabilityFlags() @@ -103,33 +106,31 @@ public class NetworkReachabilityManager { // MARK: - Initialization - /** - Creates a `NetworkReachabilityManager` instance with the specified host. - - - parameter host: The host used to evaluate network reachability. - - - returns: The new `NetworkReachabilityManager` instance. - */ + /// Creates a `NetworkReachabilityManager` instance with the specified host. + /// + /// - parameter host: The host used to evaluate network reachability. + /// + /// - returns: The new `NetworkReachabilityManager` instance. public convenience init?(host: String) { guard let reachability = SCNetworkReachabilityCreateWithName(nil, host) else { return nil } self.init(reachability: reachability) } - /** - Creates a `NetworkReachabilityManager` instance that monitors the address 0.0.0.0. - - Reachability treats the 0.0.0.0 address as a special token that causes it to monitor the general routing - status of the device, both IPv4 and IPv6. - - - returns: The new `NetworkReachabilityManager` instance. - */ + /// Creates a `NetworkReachabilityManager` instance that monitors the address 0.0.0.0. + /// + /// Reachability treats the 0.0.0.0 address as a special token that causes it to monitor the general routing + /// status of the device, both IPv4 and IPv6. + /// + /// - returns: The new `NetworkReachabilityManager` instance. public convenience init?() { var address = sockaddr_in() - address.sin_len = UInt8(sizeofValue(address)) + address.sin_len = UInt8(MemoryLayout.size) address.sin_family = sa_family_t(AF_INET) - guard let reachability = withUnsafePointer(&address, { - SCNetworkReachabilityCreateWithAddress(nil, UnsafePointer($0)) + guard let reachability = withUnsafePointer(to: &address, { pointer in + return pointer.withMemoryRebound(to: sockaddr.self, capacity: MemoryLayout.size) { + return SCNetworkReachabilityCreateWithAddress(nil, $0) + } }) else { return nil } self.init(reachability: reachability) @@ -146,19 +147,18 @@ public class NetworkReachabilityManager { // MARK: - Listening - /** - Starts listening for changes in network reachability status. - - - returns: `true` if listening was started successfully, `false` otherwise. - */ - public func startListening() -> Bool { + /// Starts listening for changes in network reachability status. + /// + /// - returns: `true` if listening was started successfully, `false` otherwise. + @discardableResult + open func startListening() -> Bool { var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil) - context.info = UnsafeMutablePointer(Unmanaged.passUnretained(self).toOpaque()) + context.info = Unmanaged.passUnretained(self).toOpaque() let callbackEnabled = SCNetworkReachabilitySetCallback( reachability, { (_, flags, info) in - let reachability = Unmanaged.fromOpaque(COpaquePointer(info)).takeUnretainedValue() + let reachability = Unmanaged.fromOpaque(info!).takeUnretainedValue() reachability.notifyListener(flags) }, &context @@ -166,7 +166,7 @@ public class NetworkReachabilityManager { let queueEnabled = SCNetworkReachabilitySetDispatchQueue(reachability, listenerQueue) - dispatch_async(listenerQueue) { + listenerQueue.async { self.previousFlags = SCNetworkReachabilityFlags() self.notifyListener(self.flags ?? SCNetworkReachabilityFlags()) } @@ -174,17 +174,15 @@ public class NetworkReachabilityManager { return callbackEnabled && queueEnabled } - /** - Stops listening for changes in network reachability status. - */ - public func stopListening() { + /// Stops listening for changes in network reachability status. + open func stopListening() { SCNetworkReachabilitySetCallback(reachability, nil, nil) SCNetworkReachabilitySetDispatchQueue(reachability, nil) } // MARK: - Internal - Listener Notification - func notifyListener(flags: SCNetworkReachabilityFlags) { + func notifyListener(_ flags: SCNetworkReachabilityFlags) { guard previousFlags != flags else { return } previousFlags = flags @@ -193,19 +191,19 @@ public class NetworkReachabilityManager { // MARK: - Internal - Network Reachability Status - func networkReachabilityStatusForFlags(flags: SCNetworkReachabilityFlags) -> NetworkReachabilityStatus { - guard flags.contains(.Reachable) else { return .NotReachable } + func networkReachabilityStatusForFlags(_ flags: SCNetworkReachabilityFlags) -> NetworkReachabilityStatus { + guard flags.contains(.reachable) else { return .notReachable } - var networkStatus: NetworkReachabilityStatus = .NotReachable + var networkStatus: NetworkReachabilityStatus = .notReachable - if !flags.contains(.ConnectionRequired) { networkStatus = .Reachable(.EthernetOrWiFi) } + if !flags.contains(.connectionRequired) { networkStatus = .reachable(.ethernetOrWiFi) } - if flags.contains(.ConnectionOnDemand) || flags.contains(.ConnectionOnTraffic) { - if !flags.contains(.InterventionRequired) { networkStatus = .Reachable(.EthernetOrWiFi) } + if flags.contains(.connectionOnDemand) || flags.contains(.connectionOnTraffic) { + if !flags.contains(.interventionRequired) { networkStatus = .reachable(.ethernetOrWiFi) } } #if os(iOS) - if flags.contains(.IsWWAN) { networkStatus = .Reachable(.WWAN) } + if flags.contains(.isWWAN) { networkStatus = .reachable(.wwan) } #endif return networkStatus @@ -216,25 +214,23 @@ public class NetworkReachabilityManager { extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {} -/** - Returns whether the two network reachability status values are equal. - - - parameter lhs: The left-hand side value to compare. - - parameter rhs: The right-hand side value to compare. - - - returns: `true` if the two values are equal, `false` otherwise. -*/ +/// Returns whether the two network reachability status values are equal. +/// +/// - parameter lhs: The left-hand side value to compare. +/// - parameter rhs: The right-hand side value to compare. +/// +/// - returns: `true` if the two values are equal, `false` otherwise. public func ==( lhs: NetworkReachabilityManager.NetworkReachabilityStatus, rhs: NetworkReachabilityManager.NetworkReachabilityStatus) -> Bool { switch (lhs, rhs) { - case (.Unknown, .Unknown): + case (.unknown, .unknown): return true - case (.NotReachable, .NotReachable): + case (.notReachable, .notReachable): return true - case let (.Reachable(lhsConnectionType), .Reachable(rhsConnectionType)): + case let (.reachable(lhsConnectionType), .reachable(rhsConnectionType)): return lhsConnectionType == rhsConnectionType default: return false diff --git a/Pods/Alamofire/Source/Notifications.swift b/Pods/Alamofire/Source/Notifications.swift index a7dbcfe..81f6e37 100644 --- a/Pods/Alamofire/Source/Notifications.swift +++ b/Pods/Alamofire/Source/Notifications.swift @@ -24,24 +24,29 @@ import Foundation -/// Contains all the `NSNotification` names posted by Alamofire with descriptions of each notification's payload. -public struct Notifications { - /// Used as a namespace for all `NSURLSessionTask` related notifications. +extension Notification.Name { + /// Used as a namespace for all `URLSessionTask` related notifications. public struct Task { - /// Notification posted when an `NSURLSessionTask` is resumed. The notification `object` contains the resumed - /// `NSURLSessionTask`. - public static let DidResume = "com.alamofire.notifications.task.didResume" + /// Posted when a `URLSessionTask` is resumed. The notification `object` contains the resumed `URLSessionTask`. + public static let DidResume = Notification.Name(rawValue: "org.alamofire.notification.name.task.didResume") - /// Notification posted when an `NSURLSessionTask` is suspended. The notification `object` contains the - /// suspended `NSURLSessionTask`. - public static let DidSuspend = "com.alamofire.notifications.task.didSuspend" + /// Posted when a `URLSessionTask` is suspended. The notification `object` contains the suspended `URLSessionTask`. + public static let DidSuspend = Notification.Name(rawValue: "org.alamofire.notification.name.task.didSuspend") - /// Notification posted when an `NSURLSessionTask` is cancelled. The notification `object` contains the - /// cancelled `NSURLSessionTask`. - public static let DidCancel = "com.alamofire.notifications.task.didCancel" + /// Posted when a `URLSessionTask` is cancelled. The notification `object` contains the cancelled `URLSessionTask`. + public static let DidCancel = Notification.Name(rawValue: "org.alamofire.notification.name.task.didCancel") - /// Notification posted when an `NSURLSessionTask` is completed. The notification `object` contains the - /// completed `NSURLSessionTask`. - public static let DidComplete = "com.alamofire.notifications.task.didComplete" + /// Posted when a `URLSessionTask` is completed. The notification `object` contains the completed `URLSessionTask`. + public static let DidComplete = Notification.Name(rawValue: "org.alamofire.notification.name.task.didComplete") + } +} + +// MARK: - + +extension Notification { + /// Used as a namespace for all `Notification` user info dictionary keys. + public struct Key { + /// User info dictionary key representing the `URLSessionTask` associated with the notification. + public static let Task = "org.alamofire.notification.key.task" } } diff --git a/Pods/Alamofire/Source/ParameterEncoding.swift b/Pods/Alamofire/Source/ParameterEncoding.swift index c54e58b..42b5b2d 100644 --- a/Pods/Alamofire/Source/ParameterEncoding.swift +++ b/Pods/Alamofire/Source/ParameterEncoding.swift @@ -24,176 +24,153 @@ import Foundation -/** - HTTP method definitions. +/// HTTP method definitions. +/// +/// See https://tools.ietf.org/html/rfc7231#section-4.3 +public enum HTTPMethod: String { + case options = "OPTIONS" + case get = "GET" + case head = "HEAD" + case post = "POST" + case put = "PUT" + case patch = "PATCH" + case delete = "DELETE" + case trace = "TRACE" + case connect = "CONNECT" +} - See https://tools.ietf.org/html/rfc7231#section-4.3 -*/ -public enum Method: String { - case OPTIONS, GET, HEAD, POST, PUT, PATCH, DELETE, TRACE, CONNECT +// MARK: - + +/// A dictionary of parameters to apply to a `URLRequest`. +public typealias Parameters = [String: Any] + +/// A type used to define how a set of parameters are applied to a `URLRequest`. +public protocol ParameterEncoding { + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. + /// + /// - throws: An `AFError.parameterEncodingFailed` error if encoding fails. + /// + /// - returns: The encoded request. + func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest } -// MARK: ParameterEncoding - -/** - Used to specify the way in which a set of parameters are applied to a URL request. - - - `URL`: Creates a query string to be set as or appended to any existing URL query for `GET`, `HEAD`, - and `DELETE` requests, or set as the body for requests with any other HTTP method. The - `Content-Type` HTTP header field of an encoded request with HTTP body is set to - `application/x-www-form-urlencoded; charset=utf-8`. Since there is no published specification - for how to encode collection types, the convention of appending `[]` to the key for array - values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for nested - dictionary values (`foo[bar]=baz`). - - - `URLEncodedInURL`: Creates query string to be set as or appended to any existing URL query. Uses the same - implementation as the `.URL` case, but always applies the encoded result to the URL. - - - `JSON`: Uses `NSJSONSerialization` to create a JSON representation of the parameters object, which is - set as the body of the request. The `Content-Type` HTTP header field of an encoded request is - set to `application/json`. - - - `PropertyList`: Uses `NSPropertyListSerialization` to create a plist representation of the parameters object, - according to the associated format and write options values, which is set as the body of the - request. The `Content-Type` HTTP header field of an encoded request is set to - `application/x-plist`. - - - `Custom`: Uses the associated closure value to construct a new request given an existing request and - parameters. -*/ -public enum ParameterEncoding { - case URL - case URLEncodedInURL - case JSON - case PropertyList(NSPropertyListFormat, NSPropertyListWriteOptions) - case Custom((URLRequestConvertible, [String: AnyObject]?) -> (NSMutableURLRequest, NSError?)) - - /** - Creates a URL request by encoding parameters and applying them onto an existing request. - - - parameter URLRequest: The request to have parameters applied. - - parameter parameters: The parameters to apply. - - - returns: A tuple containing the constructed request and the error that occurred during parameter encoding, - if any. - */ - public func encode( - URLRequest: URLRequestConvertible, - parameters: [String: AnyObject]?) - -> (NSMutableURLRequest, NSError?) - { - var mutableURLRequest = URLRequest.URLRequest +// MARK: - + +/// Creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP +/// body of the URL request. Whether the query string is set or appended to any existing URL query string or set as +/// the HTTP body depends on the destination of the encoding. +/// +/// The `Content-Type` HTTP header field of an encoded request with HTTP body is set to +/// `application/x-www-form-urlencoded; charset=utf-8`. Since there is no published specification for how to encode +/// collection types, the convention of appending `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending +/// the key surrounded by square brackets for nested dictionary values (`foo[bar]=baz`). +public struct URLEncoding: ParameterEncoding { + + // MARK: Helper Types + + /// Defines whether the url-encoded query string is applied to the existing query string or HTTP body of the + /// resulting URL request. + /// + /// - methodDependent: Applies encoded query string result to existing query string for `GET`, `HEAD` and `DELETE` + /// requests and sets as the HTTP body for requests with any other HTTP method. + /// - queryString: Sets or appends encoded query string result to existing query string. + /// - httpBody: Sets encoded query string result as the HTTP body of the URL request. + public enum Destination { + case methodDependent, queryString, httpBody + } - guard let parameters = parameters else { return (mutableURLRequest, nil) } + // MARK: Properties - var encodingError: NSError? = nil + /// Returns a default `URLEncoding` instance. + public static var `default`: URLEncoding { return URLEncoding() } - switch self { - case .URL, .URLEncodedInURL: - func query(parameters: [String: AnyObject]) -> String { - var components: [(String, String)] = [] + /// Returns a `URLEncoding` instance with a `.methodDependent` destination. + public static var methodDependent: URLEncoding { return URLEncoding() } - for key in parameters.keys.sort(<) { - let value = parameters[key]! - components += queryComponents(key, value) - } + /// Returns a `URLEncoding` instance with a `.queryString` destination. + public static var queryString: URLEncoding { return URLEncoding(destination: .queryString) } - return (components.map { "\($0)=\($1)" } as [String]).joinWithSeparator("&") - } + /// Returns a `URLEncoding` instance with an `.httpBody` destination. + public static var httpBody: URLEncoding { return URLEncoding(destination: .httpBody) } - func encodesParametersInURL(method: Method) -> Bool { - switch self { - case .URLEncodedInURL: - return true - default: - break - } - - switch method { - case .GET, .HEAD, .DELETE: - return true - default: - return false - } - } + /// The destination defining where the encoded query string is to be applied to the URL request. + public let destination: Destination - if let method = Method(rawValue: mutableURLRequest.HTTPMethod) where encodesParametersInURL(method) { - if let - URLComponents = NSURLComponents(URL: mutableURLRequest.URL!, resolvingAgainstBaseURL: false) - where !parameters.isEmpty - { - let percentEncodedQuery = (URLComponents.percentEncodedQuery.map { $0 + "&" } ?? "") + query(parameters) - URLComponents.percentEncodedQuery = percentEncodedQuery - mutableURLRequest.URL = URLComponents.URL - } - } else { - if mutableURLRequest.valueForHTTPHeaderField("Content-Type") == nil { - mutableURLRequest.setValue( - "application/x-www-form-urlencoded; charset=utf-8", - forHTTPHeaderField: "Content-Type" - ) - } - - mutableURLRequest.HTTPBody = query(parameters).dataUsingEncoding( - NSUTF8StringEncoding, - allowLossyConversion: false - ) + // MARK: Initialization + + /// Creates a `URLEncoding` instance using the specified destination. + /// + /// - parameter destination: The destination defining where the encoded query string is to be applied. + /// + /// - returns: The new `URLEncoding` instance. + public init(destination: Destination = .methodDependent) { + self.destination = destination + } + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { + var urlRequest = try urlRequest.asURLRequest() + + guard let parameters = parameters else { return urlRequest } + + if let method = HTTPMethod(rawValue: urlRequest.httpMethod ?? "GET"), encodesParametersInURL(with: method) { + guard let url = urlRequest.url else { + throw AFError.parameterEncodingFailed(reason: .missingURL) } - case .JSON: - do { - let options = NSJSONWritingOptions() - let data = try NSJSONSerialization.dataWithJSONObject(parameters, options: options) - - if mutableURLRequest.valueForHTTPHeaderField("Content-Type") == nil { - mutableURLRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - mutableURLRequest.HTTPBody = data - } catch { - encodingError = error as NSError + + if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { + let percentEncodedQuery = (urlComponents.percentEncodedQuery.map { $0 + "&" } ?? "") + query(parameters) + urlComponents.percentEncodedQuery = percentEncodedQuery + urlRequest.url = urlComponents.url } - case .PropertyList(let format, let options): - do { - let data = try NSPropertyListSerialization.dataWithPropertyList( - parameters, - format: format, - options: options - ) - - if mutableURLRequest.valueForHTTPHeaderField("Content-Type") == nil { - mutableURLRequest.setValue("application/x-plist", forHTTPHeaderField: "Content-Type") - } - - mutableURLRequest.HTTPBody = data - } catch { - encodingError = error as NSError + } else { + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/x-www-form-urlencoded; charset=utf-8", forHTTPHeaderField: "Content-Type") } - case .Custom(let closure): - (mutableURLRequest, encodingError) = closure(mutableURLRequest, parameters) + + urlRequest.httpBody = query(parameters).data(using: .utf8, allowLossyConversion: false) } - return (mutableURLRequest, encodingError) + return urlRequest } - /** - Creates percent-escaped, URL encoded query string components from the given key-value pair using recursion. - - - parameter key: The key of the query component. - - parameter value: The value of the query component. - - - returns: The percent-escaped, URL encoded query string components. - */ - public func queryComponents(key: String, _ value: AnyObject) -> [(String, String)] { + /// Creates percent-escaped, URL encoded query string components from the given key-value pair using recursion. + /// + /// - parameter key: The key of the query component. + /// - parameter value: The value of the query component. + /// + /// - returns: The percent-escaped, URL encoded query string components. + public func queryComponents(fromKey key: String, value: Any) -> [(String, String)] { var components: [(String, String)] = [] - if let dictionary = value as? [String: AnyObject] { + if let dictionary = value as? [String: Any] { for (nestedKey, value) in dictionary { - components += queryComponents("\(key)[\(nestedKey)]", value) + components += queryComponents(fromKey: "\(key)[\(nestedKey)]", value: value) } - } else if let array = value as? [AnyObject] { + } else if let array = value as? [Any] { for value in array { - components += queryComponents("\(key)[]", value) + components += queryComponents(fromKey: "\(key)[]", value: value) + } + } else if let value = value as? NSNumber { + if value.isBool { + components.append((escape(key), escape((value.boolValue ? "1" : "0")))) + } else { + components.append((escape(key), escape("\(value)"))) } + } else if let bool = value as? Bool { + components.append((escape(key), escape((bool ? "1" : "0")))) } else { components.append((escape(key), escape("\(value)"))) } @@ -201,61 +178,196 @@ public enum ParameterEncoding { return components } - /** - Returns a percent-escaped string following RFC 3986 for a query string key or value. + /// Returns a percent-escaped string following RFC 3986 for a query string key or value. + /// + /// RFC 3986 states that the following characters are "reserved" characters. + /// + /// - General Delimiters: ":", "#", "[", "]", "@", "?", "/" + /// - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" + /// + /// In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow + /// query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" + /// should be percent-escaped in the query string. + /// + /// - parameter string: The string to be percent-escaped. + /// + /// - returns: The percent-escaped string. + public func escape(_ string: String) -> String { + let generalDelimitersToEncode = ":#[]@" // does not include "?" or "/" due to RFC 3986 - Section 3.4 + let subDelimitersToEncode = "!$&'()*+,;=" - RFC 3986 states that the following characters are "reserved" characters. + var allowedCharacterSet = CharacterSet.urlQueryAllowed + allowedCharacterSet.remove(charactersIn: "\(generalDelimitersToEncode)\(subDelimitersToEncode)") - - General Delimiters: ":", "#", "[", "]", "@", "?", "/" - - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" + return string.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet) ?? string + } - In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow - query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" - should be percent-escaped in the query string. + private func query(_ parameters: [String: Any]) -> String { + var components: [(String, String)] = [] - - parameter string: The string to be percent-escaped. + for key in parameters.keys.sorted(by: <) { + let value = parameters[key]! + components += queryComponents(fromKey: key, value: value) + } - - returns: The percent-escaped string. - */ - public func escape(string: String) -> String { - let generalDelimitersToEncode = ":#[]@" // does not include "?" or "/" due to RFC 3986 - Section 3.4 - let subDelimitersToEncode = "!$&'()*+,;=" + return components.map { "\($0)=\($1)" }.joined(separator: "&") + } - let allowedCharacterSet = NSCharacterSet.URLQueryAllowedCharacterSet().mutableCopy() as! NSMutableCharacterSet - allowedCharacterSet.removeCharactersInString(generalDelimitersToEncode + subDelimitersToEncode) + private func encodesParametersInURL(with method: HTTPMethod) -> Bool { + switch destination { + case .queryString: + return true + case .httpBody: + return false + default: + break + } - var escaped = "" + switch method { + case .get, .head, .delete: + return true + default: + return false + } + } +} - //========================================================================================================== - // - // Batching is required for escaping due to an internal bug in iOS 8.1 and 8.2. Encoding more than a few - // hundred Chinese characters causes various malloc error crashes. To avoid this issue until iOS 8 is no - // longer supported, batching MUST be used for encoding. This introduces roughly a 20% overhead. For more - // info, please refer to: - // - // - https://github.com/Alamofire/Alamofire/issues/206 - // - //========================================================================================================== +// MARK: - - if #available(iOS 8.3, OSX 10.10, *) { - escaped = string.stringByAddingPercentEncodingWithAllowedCharacters(allowedCharacterSet) ?? string - } else { - let batchSize = 50 - var index = string.startIndex +/// Uses `JSONSerialization` to create a JSON representation of the parameters object, which is set as the body of the +/// request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`. +public struct JSONEncoding: ParameterEncoding { - while index != string.endIndex { - let startIndex = index - let endIndex = index.advancedBy(batchSize, limit: string.endIndex) - let range = startIndex.. URLRequest { + var urlRequest = try urlRequest.asURLRequest() + + guard let parameters = parameters else { return urlRequest } + + do { + let data = try JSONSerialization.data(withJSONObject: parameters, options: options) + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") } + + urlRequest.httpBody = data + } catch { + throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error)) } - return escaped + return urlRequest } } + +// MARK: - + +/// Uses `PropertyListSerialization` to create a plist representation of the parameters object, according to the +/// associated format and write options values, which is set as the body of the request. The `Content-Type` HTTP header +/// field of an encoded request is set to `application/x-plist`. +public struct PropertyListEncoding: ParameterEncoding { + + // MARK: Properties + + /// Returns a default `PropertyListEncoding` instance. + public static var `default`: PropertyListEncoding { return PropertyListEncoding() } + + /// Returns a `PropertyListEncoding` instance with xml formatting and default writing options. + public static var xml: PropertyListEncoding { return PropertyListEncoding(format: .xml) } + + /// Returns a `PropertyListEncoding` instance with binary formatting and default writing options. + public static var binary: PropertyListEncoding { return PropertyListEncoding(format: .binary) } + + /// The property list serialization format. + public let format: PropertyListSerialization.PropertyListFormat + + /// The options for writing the parameters as plist data. + public let options: PropertyListSerialization.WriteOptions + + // MARK: Initialization + + /// Creates a `PropertyListEncoding` instance using the specified format and options. + /// + /// - parameter format: The property list serialization format. + /// - parameter options: The options for writing the parameters as plist data. + /// + /// - returns: The new `PropertyListEncoding` instance. + public init( + format: PropertyListSerialization.PropertyListFormat = .xml, + options: PropertyListSerialization.WriteOptions = 0) + { + self.format = format + self.options = options + } + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { + var urlRequest = try urlRequest.asURLRequest() + + guard let parameters = parameters else { return urlRequest } + + do { + let data = try PropertyListSerialization.data( + fromPropertyList: parameters, + format: format, + options: options + ) + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/x-plist", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = data + } catch { + throw AFError.parameterEncodingFailed(reason: .propertyListEncodingFailed(error: error)) + } + + return urlRequest + } +} + +// MARK: - + +extension NSNumber { + fileprivate var isBool: Bool { return CFBooleanGetTypeID() == CFGetTypeID(self) } +} diff --git a/Pods/Alamofire/Source/Request.swift b/Pods/Alamofire/Source/Request.swift index 3e1c731..85eb869 100644 --- a/Pods/Alamofire/Source/Request.swift +++ b/Pods/Alamofire/Source/Request.swift @@ -24,549 +24,577 @@ import Foundation -/** - Responsible for sending a request and receiving the response and associated data from the server, as well as - managing its underlying `NSURLSessionTask`. -*/ -public class Request { +/// A type that can inspect and optionally adapt a `URLRequest` in some manner if necessary. +public protocol RequestAdapter { + /// Inspects and adapts the specified `URLRequest` in some manner if necessary and returns the result. + /// + /// - parameter urlRequest: The URL request to adapt. + /// + /// - throws: An `Error` if the adaptation encounters an error. + /// + /// - returns: The adapted `URLRequest`. + func adapt(_ urlRequest: URLRequest) throws -> URLRequest +} + +// MARK: - + +/// A closure executed when the `RequestRetrier` determines whether a `Request` should be retried or not. +public typealias RequestRetryCompletion = (_ shouldRetry: Bool, _ timeDelay: TimeInterval) -> Void + +/// A type that determines whether a request should be retried after being executed by the specified session manager +/// and encountering an error. +public protocol RequestRetrier { + /// Determines whether the `Request` should be retried by calling the `completion` closure. + /// + /// This operation is fully asychronous. 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. + /// + /// - parameter manager: The session manager the request was executed on. + /// - parameter request: The request that failed due to the encountered error. + /// - parameter error: The error encountered when executing the request. + /// - parameter completion: The completion closure to be executed when retry decision has been determined. + func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion) +} + +// MARK: - + +protocol TaskConvertible { + func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask +} + +/// A dictionary of headers to apply to a `URLRequest`. +public typealias HTTPHeaders = [String: String] + +// MARK: - + +/// Responsible for sending a request and receiving the response and associated data from the server, as well as +/// managing its underlying `URLSessionTask`. +open class Request { + + // MARK: Helper Types + + /// A closure executed when monitoring upload or download progress of a request. + public typealias ProgressHandler = (Progress) -> Void + + enum RequestTask { + case data(TaskConvertible?, URLSessionTask?) + case download(TaskConvertible?, URLSessionTask?) + case upload(TaskConvertible?, URLSessionTask?) + case stream(TaskConvertible?, URLSessionTask?) + } - // MARK: - Properties + // MARK: Properties /// The delegate for the underlying task. - public let delegate: TaskDelegate + open internal(set) var delegate: TaskDelegate { + get { + taskDelegateLock.lock() ; defer { taskDelegateLock.unlock() } + return taskDelegate + } + set { + taskDelegateLock.lock() ; defer { taskDelegateLock.unlock() } + taskDelegate = newValue + } + } /// The underlying task. - public var task: NSURLSessionTask { return delegate.task } + open var task: URLSessionTask? { return delegate.task } /// The session belonging to the underlying task. - public let session: NSURLSession + open let session: URLSession /// The request sent or to be sent to the server. - public var request: NSURLRequest? { return task.originalRequest } + open var request: URLRequest? { return task?.originalRequest } /// The response received from the server, if any. - public var response: NSHTTPURLResponse? { return task.response as? NSHTTPURLResponse } + open var response: HTTPURLResponse? { return task?.response as? HTTPURLResponse } - /// The progress of the request lifecycle. - public var progress: NSProgress { return delegate.progress } + let originalTask: TaskConvertible? var startTime: CFAbsoluteTime? var endTime: CFAbsoluteTime? - // MARK: - Lifecycle + var validations: [() -> Void] = [] + + private var taskDelegate: TaskDelegate + private var taskDelegateLock = NSLock() + + // MARK: Lifecycle - init(session: NSURLSession, task: NSURLSessionTask) { + init(session: URLSession, requestTask: RequestTask, error: Error? = nil) { self.session = session - switch task { - case is NSURLSessionUploadTask: - delegate = UploadTaskDelegate(task: task) - case is NSURLSessionDataTask: - delegate = DataTaskDelegate(task: task) - case is NSURLSessionDownloadTask: - delegate = DownloadTaskDelegate(task: task) - default: - delegate = TaskDelegate(task: task) + switch requestTask { + case .data(let originalTask, let task): + taskDelegate = DataTaskDelegate(task: task) + self.originalTask = originalTask + case .download(let originalTask, let task): + taskDelegate = DownloadTaskDelegate(task: task) + self.originalTask = originalTask + case .upload(let originalTask, let task): + taskDelegate = UploadTaskDelegate(task: task) + self.originalTask = originalTask + case .stream(let originalTask, let task): + taskDelegate = TaskDelegate(task: task) + self.originalTask = originalTask } - delegate.queue.addOperationWithBlock { self.endTime = CFAbsoluteTimeGetCurrent() } + delegate.error = error + delegate.queue.addOperation { self.endTime = CFAbsoluteTimeGetCurrent() } } - // MARK: - Authentication - - /** - Associates an HTTP Basic credential with the request. - - - parameter user: The user. - - parameter password: The password. - - parameter persistence: The URL credential persistence. `.ForSession` by default. - - - returns: The request. - */ - public func authenticate( - user user: String, + // MARK: Authentication + + /// Associates an HTTP Basic credential with the request. + /// + /// - parameter user: The user. + /// - parameter password: The password. + /// - parameter persistence: The URL credential persistence. `.ForSession` by default. + /// + /// - returns: The request. + @discardableResult + open func authenticate( + user: String, password: String, - persistence: NSURLCredentialPersistence = .ForSession) + persistence: URLCredential.Persistence = .forSession) -> Self { - let credential = NSURLCredential(user: user, password: password, persistence: persistence) - + let credential = URLCredential(user: user, password: password, persistence: persistence) return authenticate(usingCredential: credential) } - /** - Associates a specified credential with the request. - - - parameter credential: The credential. - - - returns: The request. - */ - public func authenticate(usingCredential credential: NSURLCredential) -> Self { + /// Associates a specified credential with the request. + /// + /// - parameter credential: The credential. + /// + /// - returns: The request. + @discardableResult + open func authenticate(usingCredential credential: URLCredential) -> Self { delegate.credential = credential - return self } - /** - Returns a base64 encoded basic authentication credential as an authorization header dictionary. - - - parameter user: The user. - - parameter password: The password. - - - returns: A dictionary with Authorization key and credential value or empty dictionary if encoding fails. - */ - public static func authorizationHeader(user user: String, password: String) -> [String: String] { - guard let data = "\(user):\(password)".dataUsingEncoding(NSUTF8StringEncoding) else { return [:] } + /// Returns a base64 encoded basic authentication credential as an authorization header tuple. + /// + /// - parameter user: The user. + /// - parameter password: The password. + /// + /// - returns: A tuple with Authorization header and credential value if encoding succeeds, `nil` otherwise. + open static func authorizationHeader(user: String, password: String) -> (key: String, value: String)? { + guard let data = "\(user):\(password)".data(using: .utf8) else { return nil } - let credential = data.base64EncodedStringWithOptions([]) + let credential = data.base64EncodedString(options: []) - return ["Authorization": "Basic \(credential)"] + return (key: "Authorization", value: "Basic \(credential)") } - // MARK: - Progress + // MARK: State - /** - Sets a closure to be called periodically during the lifecycle of the request as data is written to or read - from the server. + /// Resumes the request. + open func resume() { + guard let task = task else { delegate.queue.isSuspended = false ; return } - - For uploads, the progress closure returns the bytes written, total bytes written, and total bytes expected - to write. - - For downloads and data tasks, the progress closure returns the bytes read, total bytes read, and total bytes - expected to read. - - - parameter closure: The code to be executed periodically during the lifecycle of the request. + if startTime == nil { startTime = CFAbsoluteTimeGetCurrent() } - - returns: The request. - */ - public func progress(closure: ((Int64, Int64, Int64) -> Void)? = nil) -> Self { - if let uploadDelegate = delegate as? UploadTaskDelegate { - uploadDelegate.uploadProgress = closure - } else if let dataDelegate = delegate as? DataTaskDelegate { - dataDelegate.dataProgress = closure - } else if let downloadDelegate = delegate as? DownloadTaskDelegate { - downloadDelegate.downloadProgress = closure - } + task.resume() - return self + NotificationCenter.default.post( + name: Notification.Name.Task.DidResume, + object: self, + userInfo: [Notification.Key.Task: task] + ) } - /** - Sets a closure to be called periodically during the lifecycle of the request as data is read from the server. + /// Suspends the request. + open func suspend() { + guard let task = task else { return } - This closure returns the bytes most recently received from the server, not including data from previous calls. - If this closure is set, data will only be available within this closure, and will not be saved elsewhere. It is - also important to note that the `response` closure will be called with nil `responseData`. + task.suspend() - - parameter closure: The code to be executed periodically during the lifecycle of the request. + NotificationCenter.default.post( + name: Notification.Name.Task.DidSuspend, + object: self, + userInfo: [Notification.Key.Task: task] + ) + } - - returns: The request. - */ - public func stream(closure: (NSData -> Void)? = nil) -> Self { - if let dataDelegate = delegate as? DataTaskDelegate { - dataDelegate.dataStream = closure - } + /// Cancels the request. + open func cancel() { + guard let task = task else { return } - return self + task.cancel() + + NotificationCenter.default.post( + name: Notification.Name.Task.DidCancel, + object: self, + userInfo: [Notification.Key.Task: task] + ) } +} - // MARK: - State +// MARK: - CustomStringConvertible - /** - Resumes the request. - */ - public func resume() { - if startTime == nil { startTime = CFAbsoluteTimeGetCurrent() } +extension Request: CustomStringConvertible { + /// The textual representation used when written to an output stream, which includes the HTTP method and URL, as + /// well as the response status code if a response has been received. + open var description: String { + var components: [String] = [] - task.resume() - NSNotificationCenter.defaultCenter().postNotificationName(Notifications.Task.DidResume, object: task) - } + if let HTTPMethod = request?.httpMethod { + components.append(HTTPMethod) + } - /** - Suspends the request. - */ - public func suspend() { - task.suspend() - NSNotificationCenter.defaultCenter().postNotificationName(Notifications.Task.DidSuspend, object: task) - } + if let urlString = request?.url?.absoluteString { + components.append(urlString) + } - /** - Cancels the request. - */ - public func cancel() { - if let - downloadDelegate = delegate as? DownloadTaskDelegate, - downloadTask = downloadDelegate.downloadTask - { - downloadTask.cancelByProducingResumeData { data in - downloadDelegate.resumeData = data - } - } else { - task.cancel() + if let response = response { + components.append("(\(response.statusCode))") } - NSNotificationCenter.defaultCenter().postNotificationName(Notifications.Task.DidCancel, object: task) + return components.joined(separator: " ") } +} - // MARK: - TaskDelegate - - /** - The task delegate is responsible for handling all delegate callbacks for the underlying task as well as - executing all operations attached to the serial operation queue upon task completion. - */ - public class TaskDelegate: NSObject { +// MARK: - CustomDebugStringConvertible - /// The serial operation queue used to execute all operations after the task completes. - public let queue: NSOperationQueue +extension Request: CustomDebugStringConvertible { + /// The textual representation used when written to an output stream, in the form of a cURL command. + open var debugDescription: String { + return cURLRepresentation() + } - let task: NSURLSessionTask - let progress: NSProgress + func cURLRepresentation() -> String { + var components = ["$ curl -i"] - var data: NSData? { return nil } - var error: NSError? + guard let request = self.request, + let url = request.url, + let host = url.host + else { + return "$ curl command could not be created" + } - var initialResponseTime: CFAbsoluteTime? - var credential: NSURLCredential? + if let httpMethod = request.httpMethod, httpMethod != "GET" { + components.append("-X \(httpMethod)") + } - init(task: NSURLSessionTask) { - self.task = task - self.progress = NSProgress(totalUnitCount: 0) - self.queue = { - let operationQueue = NSOperationQueue() - operationQueue.maxConcurrentOperationCount = 1 - operationQueue.suspended = true + if let credentialStorage = self.session.configuration.urlCredentialStorage { + let protectionSpace = URLProtectionSpace( + host: host, + port: url.port ?? 0, + protocol: url.scheme, + realm: host, + authenticationMethod: NSURLAuthenticationMethodHTTPBasic + ) - if #available(OSX 10.10, *) { - operationQueue.qualityOfService = NSQualityOfService.Utility + if let credentials = credentialStorage.credentials(for: protectionSpace)?.values { + for credential in credentials { + components.append("-u \(credential.user!):\(credential.password!)") } - - return operationQueue - }() + } else { + if let credential = delegate.credential { + components.append("-u \(credential.user!):\(credential.password!)") + } + } } - deinit { - queue.cancelAllOperations() - queue.suspended = false + if session.configuration.httpShouldSetCookies { + if + let cookieStorage = session.configuration.httpCookieStorage, + let cookies = cookieStorage.cookies(for: url), !cookies.isEmpty + { + let string = cookies.reduce("") { $0 + "\($1.name)=\($1.value);" } + components.append("-b \"\(string.substring(to: string.characters.index(before: string.endIndex)))\"") + } } - // MARK: - NSURLSessionTaskDelegate - - // MARK: Override Closures - - var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> NSURLRequest?)? - var taskDidReceiveChallenge: ((NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? - var taskNeedNewBodyStream: ((NSURLSession, NSURLSessionTask) -> NSInputStream?)? - var taskDidCompleteWithError: ((NSURLSession, NSURLSessionTask, NSError?) -> Void)? - - // MARK: Delegate Methods + var headers: [AnyHashable: Any] = [:] - func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - willPerformHTTPRedirection response: NSHTTPURLResponse, - newRequest request: NSURLRequest, - completionHandler: ((NSURLRequest?) -> Void)) - { - var redirectRequest: NSURLRequest? = request - - if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { - redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) + if let additionalHeaders = session.configuration.httpAdditionalHeaders { + for (field, value) in additionalHeaders where field != AnyHashable("Cookie") { + headers[field] = value } - - completionHandler(redirectRequest) } - func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - didReceiveChallenge challenge: NSURLAuthenticationChallenge, - completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) - { - var disposition: NSURLSessionAuthChallengeDisposition = .PerformDefaultHandling - var credential: NSURLCredential? - - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) - } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - let host = challenge.protectionSpace.host - - if let - serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicyForHost(host), - serverTrust = challenge.protectionSpace.serverTrust - { - if serverTrustPolicy.evaluateServerTrust(serverTrust, isValidForHost: host) { - disposition = .UseCredential - credential = NSURLCredential(forTrust: serverTrust) - } else { - disposition = .CancelAuthenticationChallenge - } - } - } else { - if challenge.previousFailureCount > 0 { - disposition = .RejectProtectionSpace - } else { - credential = self.credential ?? session.configuration.URLCredentialStorage?.defaultCredentialForProtectionSpace(challenge.protectionSpace) - - if credential != nil { - disposition = .UseCredential - } - } + if let headerFields = request.allHTTPHeaderFields { + for (field, value) in headerFields where field != "Cookie" { + headers[field] = value } - - completionHandler(disposition, credential) } - func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - needNewBodyStream completionHandler: ((NSInputStream?) -> Void)) - { - var bodyStream: NSInputStream? + for (field, value) in headers { + components.append("-H \"\(field): \(value)\"") + } - if let taskNeedNewBodyStream = taskNeedNewBodyStream { - bodyStream = taskNeedNewBodyStream(session, task) - } + if let httpBodyData = request.httpBody, let httpBody = String(data: httpBodyData, encoding: .utf8) { + var escapedBody = httpBody.replacingOccurrences(of: "\\\"", with: "\\\\\"") + escapedBody = escapedBody.replacingOccurrences(of: "\"", with: "\\\"") - completionHandler(bodyStream) + components.append("-d \"\(escapedBody)\"") } - func URLSession(session: NSURLSession, task: NSURLSessionTask, didCompleteWithError error: NSError?) { - if let taskDidCompleteWithError = taskDidCompleteWithError { - taskDidCompleteWithError(session, task, error) - } else { - if let error = error { - self.error = error - - if let - downloadDelegate = self as? DownloadTaskDelegate, - userInfo = error.userInfo as? [String: AnyObject], - resumeData = userInfo[NSURLSessionDownloadTaskResumeData] as? NSData - { - downloadDelegate.resumeData = resumeData - } - } + components.append("\"\(url.absoluteString)\"") - queue.suspended = false - } - } + return components.joined(separator: " \\\n\t") } +} - // MARK: - DataTaskDelegate +// MARK: - - class DataTaskDelegate: TaskDelegate, NSURLSessionDataDelegate { - var dataTask: NSURLSessionDataTask? { return task as? NSURLSessionDataTask } +/// Specific type of `Request` that manages an underlying `URLSessionDataTask`. +open class DataRequest: Request { - private var totalBytesReceived: Int64 = 0 - private var mutableData: NSMutableData - override var data: NSData? { - if dataStream != nil { - return nil - } else { - return mutableData - } - } + // MARK: Helper Types - private var expectedContentLength: Int64? - private var dataProgress: ((bytesReceived: Int64, totalBytesReceived: Int64, totalBytesExpectedToReceive: Int64) -> Void)? - private var dataStream: ((data: NSData) -> Void)? + struct Requestable: TaskConvertible { + let urlRequest: URLRequest - override init(task: NSURLSessionTask) { - mutableData = NSMutableData() - super.init(task: task) + func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { + let urlRequest = try self.urlRequest.adapt(using: adapter) + return queue.syncResult { session.dataTask(with: urlRequest) } } + } - // MARK: - NSURLSessionDataDelegate - - // MARK: Override Closures + // MARK: Properties - var dataTaskDidReceiveResponse: ((NSURLSession, NSURLSessionDataTask, NSURLResponse) -> NSURLSessionResponseDisposition)? - var dataTaskDidBecomeDownloadTask: ((NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) -> Void)? - var dataTaskDidReceiveData: ((NSURLSession, NSURLSessionDataTask, NSData) -> Void)? - var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> NSCachedURLResponse?)? + /// The progress of fetching the response data from the server for the request. + open var progress: Progress { return dataDelegate.progress } - // MARK: Delegate Methods + var dataDelegate: DataTaskDelegate { return delegate as! DataTaskDelegate } - func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - didReceiveResponse response: NSURLResponse, - completionHandler: (NSURLSessionResponseDisposition -> Void)) - { - var disposition: NSURLSessionResponseDisposition = .Allow + // MARK: Stream - expectedContentLength = response.expectedContentLength + /// Sets a closure to be called periodically during the lifecycle of the request as data is read from the server. + /// + /// This closure returns the bytes most recently received from the server, not including data from previous calls. + /// If this closure is set, data will only be available within this closure, and will not be saved elsewhere. It is + /// also important to note that the server data in any `Response` object will be `nil`. + /// + /// - parameter closure: The code to be executed periodically during the lifecycle of the request. + /// + /// - returns: The request. + @discardableResult + open func stream(closure: ((Data) -> Void)? = nil) -> Self { + dataDelegate.dataStream = closure + return self + } - if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { - disposition = dataTaskDidReceiveResponse(session, dataTask, response) - } + // MARK: Progress + + /// Sets a closure to be called periodically during the lifecycle of the `Request` as data is read from the server. + /// + /// - parameter queue: The dispatch queue to execute the closure on. + /// - parameter closure: The code to be executed periodically as data is read from the server. + /// + /// - returns: The request. + @discardableResult + open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { + dataDelegate.progressHandler = (closure, queue) + return self + } +} - completionHandler(disposition) - } +// MARK: - - func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - didBecomeDownloadTask downloadTask: NSURLSessionDownloadTask) - { - dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask) - } +/// Specific type of `Request` that manages an underlying `URLSessionDownloadTask`. +open class DownloadRequest: Request { - func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveData data: NSData) { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } + // MARK: Helper Types - if let dataTaskDidReceiveData = dataTaskDidReceiveData { - dataTaskDidReceiveData(session, dataTask, data) - } else { - if let dataStream = dataStream { - dataStream(data: data) - } else { - mutableData.appendData(data) - } + /// A collection of options to be executed prior to moving a downloaded file from the temporary URL to the + /// destination URL. + public struct DownloadOptions: OptionSet { + /// Returns the raw bitmask value of the option and satisfies the `RawRepresentable` protocol. + public let rawValue: UInt - totalBytesReceived += data.length - let totalBytesExpected = dataTask.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown + /// A `DownloadOptions` flag that creates intermediate directories for the destination URL if specified. + public static let createIntermediateDirectories = DownloadOptions(rawValue: 1 << 0) - progress.totalUnitCount = totalBytesExpected - progress.completedUnitCount = totalBytesReceived + /// A `DownloadOptions` flag that removes a previous file from the destination URL if specified. + public static let removePreviousFile = DownloadOptions(rawValue: 1 << 1) - dataProgress?( - bytesReceived: Int64(data.length), - totalBytesReceived: totalBytesReceived, - totalBytesExpectedToReceive: totalBytesExpected - ) - } + /// Creates a `DownloadFileDestinationOptions` instance with the specified raw value. + /// + /// - parameter rawValue: The raw bitmask value for the option. + /// + /// - returns: A new log level instance. + public init(rawValue: UInt) { + self.rawValue = rawValue } + } - func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - willCacheResponse proposedResponse: NSCachedURLResponse, - completionHandler: ((NSCachedURLResponse?) -> Void)) - { - var cachedResponse: NSCachedURLResponse? = proposedResponse - - if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { - cachedResponse = dataTaskWillCacheResponse(session, dataTask, proposedResponse) + /// A closure executed once a download request has successfully completed in order to determine where to move the + /// temporary file written to during the download process. The closure takes two arguments: the temporary file URL + /// and the URL response, and returns a two arguments: the file URL where the temporary file should be moved and + /// the options defining how the file should be moved. + public typealias DownloadFileDestination = ( + _ temporaryURL: URL, + _ response: HTTPURLResponse) + -> (destinationURL: URL, options: DownloadOptions) + + enum Downloadable: TaskConvertible { + case request(URLRequest) + case resumeData(Data) + + func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { + let task: URLSessionTask + + switch self { + case let .request(urlRequest): + let urlRequest = try urlRequest.adapt(using: adapter) + task = queue.syncResult { session.downloadTask(with: urlRequest) } + case let .resumeData(resumeData): + task = queue.syncResult { session.downloadTask(withResumeData: resumeData) } } - completionHandler(cachedResponse) + return task } } -} -// MARK: - CustomStringConvertible + // MARK: Properties -extension Request: CustomStringConvertible { + /// The resume data of the underlying download task if available after a failure. + open var resumeData: Data? { return downloadDelegate.resumeData } - /** - The textual representation used when written to an output stream, which includes the HTTP method and URL, as - well as the response status code if a response has been received. - */ - public var description: String { - var components: [String] = [] + /// The progress of downloading the response data from the server for the request. + open var progress: Progress { return downloadDelegate.progress } - if let HTTPMethod = request?.HTTPMethod { - components.append(HTTPMethod) - } + var downloadDelegate: DownloadTaskDelegate { return delegate as! DownloadTaskDelegate } - if let URLString = request?.URL?.absoluteString { - components.append(URLString) - } + // MARK: State - if let response = response { - components.append("(\(response.statusCode))") - } + /// Cancels the request. + open override func cancel() { + downloadDelegate.downloadTask.cancel { self.downloadDelegate.resumeData = $0 } - return components.joinWithSeparator(" ") + NotificationCenter.default.post( + name: Notification.Name.Task.DidCancel, + object: self, + userInfo: [Notification.Key.Task: task] + ) } -} -// MARK: - CustomDebugStringConvertible + // MARK: Progress + + /// Sets a closure to be called periodically during the lifecycle of the `Request` as data is read from the server. + /// + /// - parameter queue: The dispatch queue to execute the closure on. + /// - parameter closure: The code to be executed periodically as data is read from the server. + /// + /// - returns: The request. + @discardableResult + open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { + downloadDelegate.progressHandler = (closure, queue) + return self + } -extension Request: CustomDebugStringConvertible { - func cURLRepresentation() -> String { - var components = ["$ curl -i"] + // MARK: Destination + + /// Creates a download file destination closure which uses the default file manager to move the temporary file to a + /// file URL in the first available directory with the specified search path directory and search path domain mask. + /// + /// - parameter directory: The search path directory. `.DocumentDirectory` by default. + /// - parameter domain: The search path domain mask. `.UserDomainMask` by default. + /// + /// - returns: A download file destination closure. + open class func suggestedDownloadDestination( + for directory: FileManager.SearchPathDirectory = .documentDirectory, + in domain: FileManager.SearchPathDomainMask = .userDomainMask) + -> DownloadFileDestination + { + return { temporaryURL, response in + let directoryURLs = FileManager.default.urls(for: directory, in: domain) - guard let - request = self.request, - URL = request.URL, - host = URL.host - else { - return "$ curl command could not be created" - } + if !directoryURLs.isEmpty { + return (directoryURLs[0].appendingPathComponent(response.suggestedFilename!), []) + } - if let HTTPMethod = request.HTTPMethod where HTTPMethod != "GET" { - components.append("-X \(HTTPMethod)") + return (temporaryURL, []) } + } +} - if let credentialStorage = self.session.configuration.URLCredentialStorage { - let protectionSpace = NSURLProtectionSpace( - host: host, - port: URL.port?.integerValue ?? 0, - protocol: URL.scheme, - realm: host, - authenticationMethod: NSURLAuthenticationMethodHTTPBasic - ) +// MARK: - - if let credentials = credentialStorage.credentialsForProtectionSpace(protectionSpace)?.values { - for credential in credentials { - components.append("-u \(credential.user!):\(credential.password!)") - } - } else { - if let credential = delegate.credential { - components.append("-u \(credential.user!):\(credential.password!)") - } - } - } +/// Specific type of `Request` that manages an underlying `URLSessionUploadTask`. +open class UploadRequest: DataRequest { - if session.configuration.HTTPShouldSetCookies { - if let - cookieStorage = session.configuration.HTTPCookieStorage, - cookies = cookieStorage.cookiesForURL(URL) where !cookies.isEmpty - { - let string = cookies.reduce("") { $0 + "\($1.name)=\($1.value ?? String());" } - components.append("-b \"\(string.substringToIndex(string.endIndex.predecessor()))\"") - } - } + // MARK: Helper Types - var headers: [NSObject: AnyObject] = [:] + enum Uploadable: TaskConvertible { + case data(Data, URLRequest) + case file(URL, URLRequest) + case stream(InputStream, URLRequest) - if let additionalHeaders = session.configuration.HTTPAdditionalHeaders { - for (field, value) in additionalHeaders where field != "Cookie" { - headers[field] = value - } - } + func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { + let task: URLSessionTask - if let headerFields = request.allHTTPHeaderFields { - for (field, value) in headerFields where field != "Cookie" { - headers[field] = value + switch self { + case let .data(data, urlRequest): + let urlRequest = try urlRequest.adapt(using: adapter) + task = queue.syncResult { session.uploadTask(with: urlRequest, from: data) } + case let .file(url, urlRequest): + let urlRequest = try urlRequest.adapt(using: adapter) + task = queue.syncResult { session.uploadTask(with: urlRequest, fromFile: url) } + case let .stream(_, urlRequest): + let urlRequest = try urlRequest.adapt(using: adapter) + task = queue.syncResult { session.uploadTask(withStreamedRequest: urlRequest) } } - } - for (field, value) in headers { - components.append("-H \"\(field): \(value)\"") + return task } + } - if let - HTTPBodyData = request.HTTPBody, - HTTPBody = String(data: HTTPBodyData, encoding: NSUTF8StringEncoding) - { - var escapedBody = HTTPBody.stringByReplacingOccurrencesOfString("\\\"", withString: "\\\\\"") - escapedBody = escapedBody.stringByReplacingOccurrencesOfString("\"", withString: "\\\"") + // MARK: Properties - components.append("-d \"\(escapedBody)\"") - } + /// The progress of uploading the payload to the server for the upload request. + open var uploadProgress: Progress { return uploadDelegate.uploadProgress } + + var uploadDelegate: UploadTaskDelegate { return delegate as! UploadTaskDelegate } - #if swift(>=2.3) - components.append("\"\(URL.absoluteString!)\"") - #else - components.append("\"\(URL.absoluteString)\"") - #endif + // MARK: Upload Progress - return components.joinWithSeparator(" \\\n\t") + /// Sets a closure to be called periodically during the lifecycle of the `UploadRequest` as data is sent to + /// the server. + /// + /// After the data is sent to the server, the `progress(queue:closure:)` APIs can be used to monitor the progress + /// of data being read from the server. + /// + /// - parameter queue: The dispatch queue to execute the closure on. + /// - parameter closure: The code to be executed periodically as data is sent to the server. + /// + /// - returns: The request. + @discardableResult + open func uploadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { + uploadDelegate.uploadProgressHandler = (closure, queue) + return self } +} - /// The textual representation used when written to an output stream, in the form of a cURL command. - public var debugDescription: String { - return cURLRepresentation() +// MARK: - + +#if !os(watchOS) + +/// Specific type of `Request` that manages an underlying `URLSessionStreamTask`. +open class StreamRequest: Request { + enum Streamable: TaskConvertible { + case stream(hostName: String, port: Int) + case netService(NetService) + + func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { + let task: URLSessionTask + + switch self { + case let .stream(hostName, port): + task = queue.syncResult { session.streamTask(withHostName: hostName, port: port) } + case let .netService(netService): + task = queue.syncResult { session.streamTask(with: netService) } + } + + return task + } } } + +#endif diff --git a/Pods/Alamofire/Source/Response.swift b/Pods/Alamofire/Source/Response.swift index 9c437ff..f80779c 100644 --- a/Pods/Alamofire/Source/Response.swift +++ b/Pods/Alamofire/Source/Response.swift @@ -24,40 +24,65 @@ import Foundation -/// Used to store all response data returned from a completed `Request`. -public struct Response { +/// Used to store all data associated with an non-serialized response of a data or upload request. +public struct DefaultDataResponse { /// The URL request sent to the server. - public let request: NSURLRequest? + public let request: URLRequest? /// The server's response to the URL request. - public let response: NSHTTPURLResponse? + public let response: HTTPURLResponse? /// The data returned by the server. - public let data: NSData? + public let data: Data? + + /// The error encountered while executing or validating the request. + public let error: Error? + + var _metrics: AnyObject? + + init(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) { + self.request = request + self.response = response + self.data = data + self.error = error + } +} + +// MARK: - + +/// Used to store all data associated with a serialized response of a data or upload request. +public struct DataResponse { + /// The URL request sent to the server. + public let request: URLRequest? + + /// The server's response to the URL request. + public let response: HTTPURLResponse? + + /// The data returned by the server. + public let data: Data? /// The result of response serialization. - public let result: Result + public let result: Result /// The timeline of the complete lifecycle of the `Request`. public let timeline: Timeline - /** - Initializes the `Response` instance with the specified URL request, URL response, server data and response - serialization result. - - - parameter request: The URL request sent to the server. - - parameter response: The server's response to the URL request. - - parameter data: The data returned by the server. - - parameter result: The result of response serialization. - - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. + var _metrics: AnyObject? - - returns: the new `Response` instance. - */ + /// Creates a `DataResponse` instance with the specified parameters derived from response serialization. + /// + /// - parameter request: The URL request sent to the server. + /// - parameter response: The server's response to the URL request. + /// - parameter data: The data returned by the server. + /// - parameter result: The result of response serialization. + /// - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. + /// + /// - returns: The new `DataResponse` instance. public init( - request: NSURLRequest?, - response: NSHTTPURLResponse?, - data: NSData?, - result: Result, + request: URLRequest?, + response: HTTPURLResponse?, + data: Data?, + result: Result, timeline: Timeline = Timeline()) { self.request = request @@ -68,30 +93,204 @@ public struct Response { } } -// MARK: - CustomStringConvertible +// MARK: - -extension Response: CustomStringConvertible { +extension DataResponse: CustomStringConvertible, CustomDebugStringConvertible { /// The textual representation used when written to an output stream, which includes whether the result was a /// success or failure. public var description: String { return result.debugDescription } + + /// The debug textual representation used when written to an output stream, which includes the URL request, the URL + /// response, the server data, the response serialization result and the timeline. + public var debugDescription: String { + var output: [String] = [] + + output.append(request != nil ? "[Request]: \(request!)" : "[Request]: nil") + output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") + output.append("[Data]: \(data?.count ?? 0) bytes") + output.append("[Result]: \(result.debugDescription)") + output.append("[Timeline]: \(timeline.debugDescription)") + + return output.joined(separator: "\n") + } +} + +// MARK: - + +/// Used to store all data associated with an non-serialized response of a download request. +public struct DefaultDownloadResponse { + /// The URL request sent to the server. + public let request: URLRequest? + + /// The server's response to the URL request. + public let response: HTTPURLResponse? + + /// The temporary destination URL of the data returned from the server. + public let temporaryURL: URL? + + /// The final destination URL of the data returned from the server if it was moved. + public let destinationURL: URL? + + /// The resume data generated if the request was cancelled. + public let resumeData: Data? + + /// The error encountered while executing or validating the request. + public let error: Error? + + var _metrics: AnyObject? + + init( + request: URLRequest?, + response: HTTPURLResponse?, + temporaryURL: URL?, + destinationURL: URL?, + resumeData: Data?, + error: Error?) + { + self.request = request + self.response = response + self.temporaryURL = temporaryURL + self.destinationURL = destinationURL + self.resumeData = resumeData + self.error = error + } +} + +// MARK: - + +/// Used to store all data associated with a serialized response of a download request. +public struct DownloadResponse { + /// The URL request sent to the server. + public let request: URLRequest? + + /// The server's response to the URL request. + public let response: HTTPURLResponse? + + /// The temporary destination URL of the data returned from the server. + public let temporaryURL: URL? + + /// The final destination URL of the data returned from the server if it was moved. + public let destinationURL: URL? + + /// The resume data generated if the request was cancelled. + public let resumeData: Data? + + /// The result of response serialization. + public let result: Result + + /// The timeline of the complete lifecycle of the request. + public let timeline: Timeline + + var _metrics: AnyObject? + + /// Creates a `DownloadResponse` instance with the specified parameters derived from response serialization. + /// + /// - parameter request: The URL request sent to the server. + /// - parameter response: The server's response to the URL request. + /// - parameter temporaryURL: The temporary destination URL of the data returned from the server. + /// - parameter destinationURL: The final destination URL of the data returned from the server if it was moved. + /// - parameter resumeData: The resume data generated if the request was cancelled. + /// - parameter result: The result of response serialization. + /// - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. + /// + /// - returns: The new `DownloadResponse` instance. + public init( + request: URLRequest?, + response: HTTPURLResponse?, + temporaryURL: URL?, + destinationURL: URL?, + resumeData: Data?, + result: Result, + timeline: Timeline = Timeline()) + { + self.request = request + self.response = response + self.temporaryURL = temporaryURL + self.destinationURL = destinationURL + self.resumeData = resumeData + self.result = result + self.timeline = timeline + } } -// MARK: - CustomDebugStringConvertible +// MARK: - + +extension DownloadResponse: CustomStringConvertible, CustomDebugStringConvertible { + /// The textual representation used when written to an output stream, which includes whether the result was a + /// success or failure. + public var description: String { + return result.debugDescription + } -extension Response: CustomDebugStringConvertible { /// The debug textual representation used when written to an output stream, which includes the URL request, the URL - /// response, the server data and the response serialization result. + /// response, the temporary and destination URLs, the resume data, the response serialization result and the + /// timeline. public var debugDescription: String { var output: [String] = [] output.append(request != nil ? "[Request]: \(request!)" : "[Request]: nil") output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") - output.append("[Data]: \(data?.length ?? 0) bytes") + output.append("[TemporaryURL]: \(temporaryURL?.path ?? "nil")") + output.append("[DestinationURL]: \(destinationURL?.path ?? "nil")") + output.append("[ResumeData]: \(resumeData?.count ?? 0) bytes") output.append("[Result]: \(result.debugDescription)") output.append("[Timeline]: \(timeline.debugDescription)") - return output.joinWithSeparator("\n") + return output.joined(separator: "\n") + } +} + +// MARK: - + +protocol Response { + /// The task metrics containing the request / response statistics. + var _metrics: AnyObject? { get set } + mutating func add(_ metrics: AnyObject?) +} + +extension Response { + mutating func add(_ metrics: AnyObject?) { + #if !os(watchOS) + guard #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) else { return } + guard let metrics = metrics as? URLSessionTaskMetrics else { return } + + _metrics = metrics + #endif } } + +// MARK: - + +@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) +extension DefaultDataResponse: Response { +#if !os(watchOS) + /// The task metrics containing the request / response statistics. + public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } +#endif +} + +@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) +extension DataResponse: Response { +#if !os(watchOS) + /// The task metrics containing the request / response statistics. + public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } +#endif +} + +@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) +extension DefaultDownloadResponse: Response { +#if !os(watchOS) + /// The task metrics containing the request / response statistics. + public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } +#endif +} + +@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) +extension DownloadResponse: Response { +#if !os(watchOS) + /// The task metrics containing the request / response statistics. + public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } +#endif +} diff --git a/Pods/Alamofire/Source/ResponseSerialization.swift b/Pods/Alamofire/Source/ResponseSerialization.swift index 89e3954..0bbb373 100644 --- a/Pods/Alamofire/Source/ResponseSerialization.swift +++ b/Pods/Alamofire/Source/ResponseSerialization.swift @@ -24,101 +24,199 @@ import Foundation -// MARK: ResponseSerializer - -/** - The type in which all response serializers must conform to in order to serialize a response. -*/ -public protocol ResponseSerializerType { - /// The type of serialized object to be created by this `ResponseSerializerType`. +/// The type in which all data response serializers must conform to in order to serialize a response. +public protocol DataResponseSerializerProtocol { + /// The type of serialized object to be created by this `DataResponseSerializerType`. associatedtype SerializedObject - /// The type of error to be created by this `ResponseSerializer` if serialization fails. - associatedtype ErrorObject: ErrorType - - /** - A closure used by response handlers that takes a request, response, data and error and returns a result. - */ - var serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Result { get } + /// A closure used by response handlers that takes a request, response, data and error and returns a result. + var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result { get } } // MARK: - -/** - A generic `ResponseSerializerType` used to serialize a request, response, and data into a serialized object. -*/ -public struct ResponseSerializer: ResponseSerializerType { - /// The type of serialized object to be created by this `ResponseSerializer`. +/// A generic `DataResponseSerializerType` used to serialize a request, response, and data into a serialized object. +public struct DataResponseSerializer: DataResponseSerializerProtocol { + /// The type of serialized object to be created by this `DataResponseSerializer`. public typealias SerializedObject = Value - /// The type of error to be created by this `ResponseSerializer` if serialization fails. - public typealias ErrorObject = Error + /// A closure used by response handlers that takes a request, response, data and error and returns a result. + public var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result + + /// Initializes the `ResponseSerializer` instance with the given serialize response closure. + /// + /// - parameter serializeResponse: The closure used to serialize the response. + /// + /// - returns: The new generic response serializer instance. + public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result) { + self.serializeResponse = serializeResponse + } +} + +// MARK: - + +/// The type in which all download response serializers must conform to in order to serialize a response. +public protocol DownloadResponseSerializerProtocol { + /// The type of serialized object to be created by this `DownloadResponseSerializerType`. + associatedtype SerializedObject + + /// A closure used by response handlers that takes a request, response, url and error and returns a result. + var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result { get } +} - /** - A closure used by response handlers that takes a request, response, data and error and returns a result. - */ - public var serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Result +// MARK: - - /** - Initializes the `ResponseSerializer` instance with the given serialize response closure. +/// A generic `DownloadResponseSerializerType` used to serialize a request, response, and data into a serialized object. +public struct DownloadResponseSerializer: DownloadResponseSerializerProtocol { + /// The type of serialized object to be created by this `DownloadResponseSerializer`. + public typealias SerializedObject = Value - - parameter serializeResponse: The closure used to serialize the response. + /// A closure used by response handlers that takes a request, response, url and error and returns a result. + public var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result - - returns: The new generic response serializer instance. - */ - public init(serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Result) { + /// Initializes the `ResponseSerializer` instance with the given serialize response closure. + /// + /// - parameter serializeResponse: The closure used to serialize the response. + /// + /// - returns: The new generic response serializer instance. + public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result) { self.serializeResponse = serializeResponse } } // MARK: - Default -extension Request { +extension DataRequest { + /// Adds a handler to be called once the request has finished. + /// + /// - parameter queue: The queue on which the completion handler is dispatched. + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func response(queue: DispatchQueue? = nil, completionHandler: @escaping (DefaultDataResponse) -> Void) -> Self { + delegate.queue.addOperation { + (queue ?? DispatchQueue.main).async { + var dataResponse = DefaultDataResponse( + request: self.request, + response: self.response, + data: self.delegate.data, + error: self.delegate.error + ) - /** - Adds a handler to be called once the request has finished. + dataResponse.add(self.delegate.metrics) - - parameter queue: The queue on which the completion handler is dispatched. - - parameter completionHandler: The code to be executed once the request has finished. + completionHandler(dataResponse) + } + } - - returns: The request. - */ - public func response( - queue queue: dispatch_queue_t? = nil, - completionHandler: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Void) + return self + } + + /// Adds a handler to be called once the request has finished. + /// + /// - parameter queue: The queue on which the completion handler is dispatched. + /// - parameter responseSerializer: The response serializer responsible for serializing the request, response, + /// and data. + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func response( + queue: DispatchQueue? = nil, + responseSerializer: T, + completionHandler: @escaping (DataResponse) -> Void) -> Self { - delegate.queue.addOperationWithBlock { - dispatch_async(queue ?? dispatch_get_main_queue()) { - completionHandler(self.request, self.response, self.delegate.data, self.delegate.error) - } + delegate.queue.addOperation { + let result = responseSerializer.serializeResponse( + self.request, + self.response, + self.delegate.data, + self.delegate.error + ) + + let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() + let initialResponseTime = self.delegate.initialResponseTime ?? requestCompletedTime + + let timeline = Timeline( + requestStartTime: self.startTime ?? CFAbsoluteTimeGetCurrent(), + initialResponseTime: initialResponseTime, + requestCompletedTime: requestCompletedTime, + serializationCompletedTime: CFAbsoluteTimeGetCurrent() + ) + + var dataResponse = DataResponse( + request: self.request, + response: self.response, + data: self.delegate.data, + result: result, + timeline: timeline + ) + + dataResponse.add(self.delegate.metrics) + + (queue ?? DispatchQueue.main).async { completionHandler(dataResponse) } } return self } +} - /** - Adds a handler to be called once the request has finished. +extension DownloadRequest { + /// Adds a handler to be called once the request has finished. + /// + /// - parameter queue: The queue on which the completion handler is dispatched. + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func response( + queue: DispatchQueue? = nil, + completionHandler: @escaping (DefaultDownloadResponse) -> Void) + -> Self + { + delegate.queue.addOperation { + (queue ?? DispatchQueue.main).async { + var downloadResponse = DefaultDownloadResponse( + request: self.request, + response: self.response, + temporaryURL: self.downloadDelegate.temporaryURL, + destinationURL: self.downloadDelegate.destinationURL, + resumeData: self.downloadDelegate.resumeData, + error: self.downloadDelegate.error + ) + + downloadResponse.add(self.delegate.metrics) - - parameter queue: The queue on which the completion handler is dispatched. - - parameter responseSerializer: The response serializer responsible for serializing the request, response, - and data. - - parameter completionHandler: The code to be executed once the request has finished. + completionHandler(downloadResponse) + } + } + + return self + } - - returns: The request. - */ - public func response( - queue queue: dispatch_queue_t? = nil, + /// Adds a handler to be called once the request has finished. + /// + /// - parameter queue: The queue on which the completion handler is dispatched. + /// - parameter responseSerializer: The response serializer responsible for serializing the request, response, + /// and data contained in the destination url. + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func response( + queue: DispatchQueue? = nil, responseSerializer: T, - completionHandler: Response -> Void) + completionHandler: @escaping (DownloadResponse) -> Void) -> Self { - delegate.queue.addOperationWithBlock { + delegate.queue.addOperation { let result = responseSerializer.serializeResponse( self.request, self.response, - self.delegate.data, - self.delegate.error + self.downloadDelegate.fileURL, + self.downloadDelegate.error ) let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() @@ -131,15 +229,19 @@ extension Request { serializationCompletedTime: CFAbsoluteTimeGetCurrent() ) - let response = Response( + var downloadResponse = DownloadResponse( request: self.request, response: self.response, - data: self.delegate.data, + temporaryURL: self.downloadDelegate.temporaryURL, + destinationURL: self.downloadDelegate.destinationURL, + resumeData: self.downloadDelegate.resumeData, result: result, timeline: timeline ) - dispatch_async(queue ?? dispatch_get_main_queue()) { completionHandler(response) } + downloadResponse.add(self.delegate.metrics) + + (queue ?? DispatchQueue.main).async { completionHandler(downloadResponse) } } return self @@ -149,111 +251,220 @@ extension Request { // MARK: - Data extension Request { + /// Returns a result data type that contains the response data as-is. + /// + /// - parameter response: The response from the server. + /// - parameter data: The data returned from the server. + /// - parameter error: The error already encountered if it exists. + /// + /// - returns: The result data type. + public static func serializeResponseData(response: HTTPURLResponse?, data: Data?, error: Error?) -> Result { + guard error == nil else { return .failure(error!) } + + if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(Data()) } + + guard let validData = data else { + return .failure(AFError.responseSerializationFailed(reason: .inputDataNil)) + } - /** - Creates a response serializer that returns the associated data as-is. + return .success(validData) + } +} + +extension DataRequest { + /// Creates a response serializer that returns the associated data as-is. + /// + /// - returns: A data response serializer. + public static func dataResponseSerializer() -> DataResponseSerializer { + return DataResponseSerializer { _, response, data, error in + return Request.serializeResponseData(response: response, data: data, error: error) + } + } - - returns: A data response serializer. - */ - public static func dataResponseSerializer() -> ResponseSerializer { - return ResponseSerializer { _, response, data, error in - guard error == nil else { return .Failure(error!) } + /// Adds a handler to be called once the request has finished. + /// + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responseData( + queue: DispatchQueue? = nil, + completionHandler: @escaping (DataResponse) -> Void) + -> Self + { + return response( + queue: queue, + responseSerializer: DataRequest.dataResponseSerializer(), + completionHandler: completionHandler + ) + } +} - if let response = response where response.statusCode == 204 { return .Success(NSData()) } +extension DownloadRequest { + /// Creates a response serializer that returns the associated data as-is. + /// + /// - returns: A data response serializer. + public static func dataResponseSerializer() -> DownloadResponseSerializer { + return DownloadResponseSerializer { _, response, fileURL, error in + guard error == nil else { return .failure(error!) } - guard let validData = data else { - let failureReason = "Data could not be serialized. Input data was nil." - let error = Error.error(code: .DataSerializationFailed, failureReason: failureReason) - return .Failure(error) + guard let fileURL = fileURL else { + return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) } - return .Success(validData) + do { + let data = try Data(contentsOf: fileURL) + return Request.serializeResponseData(response: response, data: data, error: error) + } catch { + return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) + } } } - /** - Adds a handler to be called once the request has finished. - - - parameter completionHandler: The code to be executed once the request has finished. - - - returns: The request. - */ + /// Adds a handler to be called once the request has finished. + /// + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult public func responseData( - queue queue: dispatch_queue_t? = nil, - completionHandler: Response -> Void) + queue: DispatchQueue? = nil, + completionHandler: @escaping (DownloadResponse) -> Void) -> Self { - return response(queue: queue, responseSerializer: Request.dataResponseSerializer(), completionHandler: completionHandler) + return response( + queue: queue, + responseSerializer: DownloadRequest.dataResponseSerializer(), + completionHandler: completionHandler + ) } } // MARK: - String extension Request { + /// Returns a result string type initialized from the response data with the specified string encoding. + /// + /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server + /// response, falling back to the default HTTP default character set, ISO-8859-1. + /// - parameter response: The response from the server. + /// - parameter data: The data returned from the server. + /// - parameter error: The error already encountered if it exists. + /// + /// - returns: The result data type. + public static func serializeResponseString( + encoding: String.Encoding?, + response: HTTPURLResponse?, + data: Data?, + error: Error?) + -> Result + { + guard error == nil else { return .failure(error!) } - /** - Creates a response serializer that returns a string initialized from the response data with the specified - string encoding. + if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success("") } - - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server - response, falling back to the default HTTP default character set, ISO-8859-1. + guard let validData = data else { + return .failure(AFError.responseSerializationFailed(reason: .inputDataNil)) + } - - returns: A string response serializer. - */ - public static func stringResponseSerializer( - encoding encoding: NSStringEncoding? = nil) - -> ResponseSerializer - { - return ResponseSerializer { _, response, data, error in - guard error == nil else { return .Failure(error!) } + var convertedEncoding = encoding - if let response = response where response.statusCode == 204 { return .Success("") } + if let encodingName = response?.textEncodingName as CFString!, convertedEncoding == nil { + convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding( + CFStringConvertIANACharSetNameToEncoding(encodingName)) + ) + } - guard let validData = data else { - let failureReason = "String could not be serialized. Input data was nil." - let error = Error.error(code: .StringSerializationFailed, failureReason: failureReason) - return .Failure(error) - } + let actualEncoding = convertedEncoding ?? String.Encoding.isoLatin1 - var convertedEncoding = encoding + if let string = String(data: validData, encoding: actualEncoding) { + return .success(string) + } else { + return .failure(AFError.responseSerializationFailed(reason: .stringSerializationFailed(encoding: actualEncoding))) + } + } +} - if let encodingName = response?.textEncodingName where convertedEncoding == nil { - convertedEncoding = CFStringConvertEncodingToNSStringEncoding( - CFStringConvertIANACharSetNameToEncoding(encodingName) - ) - } +extension DataRequest { + /// Creates a response serializer that returns a result string type initialized from the response data with + /// the specified string encoding. + /// + /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server + /// response, falling back to the default HTTP default character set, ISO-8859-1. + /// + /// - returns: A string response serializer. + public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DataResponseSerializer { + return DataResponseSerializer { _, response, data, error in + return Request.serializeResponseString(encoding: encoding, response: response, data: data, error: error) + } + } + + /// Adds a handler to be called once the request has finished. + /// + /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the + /// server response, falling back to the default HTTP default character set, + /// ISO-8859-1. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responseString( + queue: DispatchQueue? = nil, + encoding: String.Encoding? = nil, + completionHandler: @escaping (DataResponse) -> Void) + -> Self + { + return response( + queue: queue, + responseSerializer: DataRequest.stringResponseSerializer(encoding: encoding), + completionHandler: completionHandler + ) + } +} - let actualEncoding = convertedEncoding ?? NSISOLatin1StringEncoding +extension DownloadRequest { + /// Creates a response serializer that returns a result string type initialized from the response data with + /// the specified string encoding. + /// + /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server + /// response, falling back to the default HTTP default character set, ISO-8859-1. + /// + /// - returns: A string response serializer. + public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DownloadResponseSerializer { + return DownloadResponseSerializer { _, response, fileURL, error in + guard error == nil else { return .failure(error!) } + + guard let fileURL = fileURL else { + return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) + } - if let string = String(data: validData, encoding: actualEncoding) { - return .Success(string) - } else { - let failureReason = "String could not be serialized with encoding: \(actualEncoding)" - let error = Error.error(code: .StringSerializationFailed, failureReason: failureReason) - return .Failure(error) + do { + let data = try Data(contentsOf: fileURL) + return Request.serializeResponseString(encoding: encoding, response: response, data: data, error: error) + } catch { + return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) } } } - /** - Adds a handler to be called once the request has finished. - - - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the - server response, falling back to the default HTTP default character set, - ISO-8859-1. - - parameter completionHandler: A closure to be executed once the request has finished. - - - returns: The request. - */ + /// Adds a handler to be called once the request has finished. + /// + /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the + /// server response, falling back to the default HTTP default character set, + /// ISO-8859-1. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult public func responseString( - queue queue: dispatch_queue_t? = nil, - encoding: NSStringEncoding? = nil, - completionHandler: Response -> Void) + queue: DispatchQueue? = nil, + encoding: String.Encoding? = nil, + completionHandler: @escaping (DownloadResponse) -> Void) -> Self { return response( queue: queue, - responseSerializer: Request.stringResponseSerializer(encoding: encoding), + responseSerializer: DownloadRequest.stringResponseSerializer(encoding: encoding), completionHandler: completionHandler ) } @@ -262,56 +473,119 @@ extension Request { // MARK: - JSON extension Request { + /// Returns a JSON object contained in a result type constructed from the response data using `JSONSerialization` + /// with the specified reading options. + /// + /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. + /// - parameter response: The response from the server. + /// - parameter data: The data returned from the server. + /// - parameter error: The error already encountered if it exists. + /// + /// - returns: The result data type. + public static func serializeResponseJSON( + options: JSONSerialization.ReadingOptions, + response: HTTPURLResponse?, + data: Data?, + error: Error?) + -> Result + { + guard error == nil else { return .failure(error!) } + + if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } + + guard let validData = data, validData.count > 0 else { + return .failure(AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)) + } - /** - Creates a response serializer that returns a JSON object constructed from the response data using - `NSJSONSerialization` with the specified reading options. + do { + let json = try JSONSerialization.jsonObject(with: validData, options: options) + return .success(json) + } catch { + return .failure(AFError.responseSerializationFailed(reason: .jsonSerializationFailed(error: error))) + } + } +} - - parameter options: The JSON serialization reading options. `.AllowFragments` by default. +extension DataRequest { + /// Creates a response serializer that returns a JSON object result type constructed from the response data using + /// `JSONSerialization` with the specified reading options. + /// + /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. + /// + /// - returns: A JSON object response serializer. + public static func jsonResponseSerializer( + options: JSONSerialization.ReadingOptions = .allowFragments) + -> DataResponseSerializer + { + return DataResponseSerializer { _, response, data, error in + return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) + } + } - - returns: A JSON object response serializer. - */ - public static func JSONResponseSerializer( - options options: NSJSONReadingOptions = .AllowFragments) - -> ResponseSerializer + /// Adds a handler to be called once the request has finished. + /// + /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responseJSON( + queue: DispatchQueue? = nil, + options: JSONSerialization.ReadingOptions = .allowFragments, + completionHandler: @escaping (DataResponse) -> Void) + -> Self { - return ResponseSerializer { _, response, data, error in - guard error == nil else { return .Failure(error!) } + return response( + queue: queue, + responseSerializer: DataRequest.jsonResponseSerializer(options: options), + completionHandler: completionHandler + ) + } +} - if let response = response where response.statusCode == 204 { return .Success(NSNull()) } +extension DownloadRequest { + /// Creates a response serializer that returns a JSON object result type constructed from the response data using + /// `JSONSerialization` with the specified reading options. + /// + /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. + /// + /// - returns: A JSON object response serializer. + public static func jsonResponseSerializer( + options: JSONSerialization.ReadingOptions = .allowFragments) + -> DownloadResponseSerializer + { + return DownloadResponseSerializer { _, response, fileURL, error in + guard error == nil else { return .failure(error!) } - guard let validData = data where validData.length > 0 else { - let failureReason = "JSON could not be serialized. Input data was nil or zero length." - let error = Error.error(code: .JSONSerializationFailed, failureReason: failureReason) - return .Failure(error) + guard let fileURL = fileURL else { + return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) } do { - let JSON = try NSJSONSerialization.JSONObjectWithData(validData, options: options) - return .Success(JSON) + let data = try Data(contentsOf: fileURL) + return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) } catch { - return .Failure(error as NSError) + return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) } } } - /** - Adds a handler to be called once the request has finished. - - - parameter options: The JSON serialization reading options. `.AllowFragments` by default. - - parameter completionHandler: A closure to be executed once the request has finished. - - - returns: The request. - */ + /// Adds a handler to be called once the request has finished. + /// + /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult public func responseJSON( - queue queue: dispatch_queue_t? = nil, - options: NSJSONReadingOptions = .AllowFragments, - completionHandler: Response -> Void) + queue: DispatchQueue? = nil, + options: JSONSerialization.ReadingOptions = .allowFragments, + completionHandler: @escaping (DownloadResponse) -> Void) -> Self { return response( queue: queue, - responseSerializer: Request.JSONResponseSerializer(options: options), + responseSerializer: DownloadRequest.jsonResponseSerializer(options: options), completionHandler: completionHandler ) } @@ -320,59 +594,123 @@ extension Request { // MARK: - Property List extension Request { + /// Returns a plist object contained in a result type constructed from the response data using + /// `PropertyListSerialization` with the specified reading options. + /// + /// - parameter options: The property list reading options. Defaults to `[]`. + /// - parameter response: The response from the server. + /// - parameter data: The data returned from the server. + /// - parameter error: The error already encountered if it exists. + /// + /// - returns: The result data type. + public static func serializeResponsePropertyList( + options: PropertyListSerialization.ReadOptions, + response: HTTPURLResponse?, + data: Data?, + error: Error?) + -> Result + { + guard error == nil else { return .failure(error!) } - /** - Creates a response serializer that returns an object constructed from the response data using - `NSPropertyListSerialization` with the specified reading options. + if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } + + guard let validData = data, validData.count > 0 else { + return .failure(AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)) + } - - parameter options: The property list reading options. `NSPropertyListReadOptions()` by default. + do { + let plist = try PropertyListSerialization.propertyList(from: validData, options: options, format: nil) + return .success(plist) + } catch { + return .failure(AFError.responseSerializationFailed(reason: .propertyListSerializationFailed(error: error))) + } + } +} - - returns: A property list object response serializer. - */ +extension DataRequest { + /// Creates a response serializer that returns an object constructed from the response data using + /// `PropertyListSerialization` with the specified reading options. + /// + /// - parameter options: The property list reading options. Defaults to `[]`. + /// + /// - returns: A property list object response serializer. public static func propertyListResponseSerializer( - options options: NSPropertyListReadOptions = NSPropertyListReadOptions()) - -> ResponseSerializer + options: PropertyListSerialization.ReadOptions = []) + -> DataResponseSerializer + { + return DataResponseSerializer { _, response, data, error in + return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) + } + } + + /// Adds a handler to be called once the request has finished. + /// + /// - parameter options: The property list reading options. Defaults to `[]`. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responsePropertyList( + queue: DispatchQueue? = nil, + options: PropertyListSerialization.ReadOptions = [], + completionHandler: @escaping (DataResponse) -> Void) + -> Self { - return ResponseSerializer { _, response, data, error in - guard error == nil else { return .Failure(error!) } + return response( + queue: queue, + responseSerializer: DataRequest.propertyListResponseSerializer(options: options), + completionHandler: completionHandler + ) + } +} - if let response = response where response.statusCode == 204 { return .Success(NSNull()) } +extension DownloadRequest { + /// Creates a response serializer that returns an object constructed from the response data using + /// `PropertyListSerialization` with the specified reading options. + /// + /// - parameter options: The property list reading options. Defaults to `[]`. + /// + /// - returns: A property list object response serializer. + public static func propertyListResponseSerializer( + options: PropertyListSerialization.ReadOptions = []) + -> DownloadResponseSerializer + { + return DownloadResponseSerializer { _, response, fileURL, error in + guard error == nil else { return .failure(error!) } - guard let validData = data where validData.length > 0 else { - let failureReason = "Property list could not be serialized. Input data was nil or zero length." - let error = Error.error(code: .PropertyListSerializationFailed, failureReason: failureReason) - return .Failure(error) + guard let fileURL = fileURL else { + return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) } do { - let plist = try NSPropertyListSerialization.propertyListWithData(validData, options: options, format: nil) - return .Success(plist) + let data = try Data(contentsOf: fileURL) + return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) } catch { - return .Failure(error as NSError) + return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) } } } - /** - Adds a handler to be called once the request has finished. - - - parameter options: The property list reading options. `0` by default. - - parameter completionHandler: A closure to be executed once the request has finished. The closure takes 3 - arguments: the URL request, the URL response, the server data and the result - produced while creating the property list. - - - returns: The request. - */ + /// Adds a handler to be called once the request has finished. + /// + /// - parameter options: The property list reading options. Defaults to `[]`. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult public func responsePropertyList( - queue queue: dispatch_queue_t? = nil, - options: NSPropertyListReadOptions = NSPropertyListReadOptions(), - completionHandler: Response -> Void) + queue: DispatchQueue? = nil, + options: PropertyListSerialization.ReadOptions = [], + completionHandler: @escaping (DownloadResponse) -> Void) -> Self { return response( queue: queue, - responseSerializer: Request.propertyListResponseSerializer(options: options), + responseSerializer: DownloadRequest.propertyListResponseSerializer(options: options), completionHandler: completionHandler ) } } + +/// A set of HTTP response status code that do not contain response data. +private let emptyDataStatusCodes: Set = [204, 205] diff --git a/Pods/Alamofire/Source/Result.swift b/Pods/Alamofire/Source/Result.swift index 4aabf08..2293308 100644 --- a/Pods/Alamofire/Source/Result.swift +++ b/Pods/Alamofire/Source/Result.swift @@ -24,24 +24,23 @@ import Foundation -/** - Used to represent whether a request was successful or encountered an error. - - - Success: The request and all post processing operations were successful resulting in the serialization of the - provided associated value. - - Failure: The request encountered an error resulting in a failure. The associated values are the original data - provided by the server as well as the error that caused the failure. -*/ -public enum Result { - case Success(Value) - case Failure(Error) +/// Used to represent whether a request was successful or encountered an error. +/// +/// - success: The request and all post processing operations were successful resulting in the serialization of the +/// provided associated value. +/// +/// - failure: The request encountered an error resulting in a failure. The associated values are the original data +/// provided by the server as well as the error that caused the failure. +public enum Result { + case success(Value) + case failure(Error) /// Returns `true` if the result is a success, `false` otherwise. public var isSuccess: Bool { switch self { - case .Success: + case .success: return true - case .Failure: + case .failure: return false } } @@ -54,9 +53,9 @@ public enum Result { /// Returns the associated value if the result is a success, `nil` otherwise. public var value: Value? { switch self { - case .Success(let value): + case .success(let value): return value - case .Failure: + case .failure: return nil } } @@ -64,9 +63,9 @@ public enum Result { /// Returns the associated error value if the result is a failure, `nil` otherwise. public var error: Error? { switch self { - case .Success: + case .success: return nil - case .Failure(let error): + case .failure(let error): return error } } @@ -79,9 +78,9 @@ extension Result: CustomStringConvertible { /// success or failure. public var description: String { switch self { - case .Success: + case .success: return "SUCCESS" - case .Failure: + case .failure: return "FAILURE" } } @@ -94,9 +93,9 @@ extension Result: CustomDebugStringConvertible { /// success or failure in addition to the value or error. public var debugDescription: String { switch self { - case .Success(let value): + case .success(let value): return "SUCCESS: \(value)" - case .Failure(let error): + case .failure(let error): return "FAILURE: \(error)" } } diff --git a/Pods/Alamofire/Source/ServerTrustPolicy.swift b/Pods/Alamofire/Source/ServerTrustPolicy.swift index d8398f1..4d5030f 100644 --- a/Pods/Alamofire/Source/ServerTrustPolicy.swift +++ b/Pods/Alamofire/Source/ServerTrustPolicy.swift @@ -25,119 +25,111 @@ import Foundation /// Responsible for managing the mapping of `ServerTrustPolicy` objects to a given host. -public class ServerTrustPolicyManager { +open class ServerTrustPolicyManager { /// The dictionary of policies mapped to a particular host. - public let policies: [String: ServerTrustPolicy] - - /** - Initializes the `ServerTrustPolicyManager` instance with the given policies. - - Since different servers and web services can have different leaf certificates, intermediate and even root - certficates, it is important to have the flexibility to specify evaluation policies on a per host basis. This - allows for scenarios such as using default evaluation for host1, certificate pinning for host2, public key - pinning for host3 and disabling evaluation for host4. - - - parameter policies: A dictionary of all policies mapped to a particular host. - - - returns: The new `ServerTrustPolicyManager` instance. - */ + open let policies: [String: ServerTrustPolicy] + + /// Initializes the `ServerTrustPolicyManager` instance with the given policies. + /// + /// Since different servers and web services can have different leaf certificates, intermediate and even root + /// certficates, it is important to have the flexibility to specify evaluation policies on a per host basis. This + /// allows for scenarios such as using default evaluation for host1, certificate pinning for host2, public key + /// pinning for host3 and disabling evaluation for host4. + /// + /// - parameter policies: A dictionary of all policies mapped to a particular host. + /// + /// - returns: The new `ServerTrustPolicyManager` instance. public init(policies: [String: ServerTrustPolicy]) { self.policies = policies } - /** - Returns the `ServerTrustPolicy` for the given host if applicable. - - By default, this method will return the policy that perfectly matches the given host. Subclasses could override - this method and implement more complex mapping implementations such as wildcards. - - - parameter host: The host to use when searching for a matching policy. - - - returns: The server trust policy for the given host if found. - */ - public func serverTrustPolicyForHost(host: String) -> ServerTrustPolicy? { + /// Returns the `ServerTrustPolicy` for the given host if applicable. + /// + /// By default, this method will return the policy that perfectly matches the given host. Subclasses could override + /// this method and implement more complex mapping implementations such as wildcards. + /// + /// - parameter host: The host to use when searching for a matching policy. + /// + /// - returns: The server trust policy for the given host if found. + open func serverTrustPolicy(forHost host: String) -> ServerTrustPolicy? { return policies[host] } } // MARK: - -extension NSURLSession { +extension URLSession { private struct AssociatedKeys { - static var ManagerKey = "NSURLSession.ServerTrustPolicyManager" + static var managerKey = "URLSession.ServerTrustPolicyManager" } var serverTrustPolicyManager: ServerTrustPolicyManager? { get { - return objc_getAssociatedObject(self, &AssociatedKeys.ManagerKey) as? ServerTrustPolicyManager + return objc_getAssociatedObject(self, &AssociatedKeys.managerKey) as? ServerTrustPolicyManager } set (manager) { - objc_setAssociatedObject(self, &AssociatedKeys.ManagerKey, manager, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) + objc_setAssociatedObject(self, &AssociatedKeys.managerKey, manager, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) } } } // MARK: - ServerTrustPolicy -/** - The `ServerTrustPolicy` evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when - connecting to a server over a secure HTTPS connection. The policy configuration then evaluates the server trust - with a given set of criteria to determine whether the server trust is valid and the connection should be made. - - Using pinned certificates or public keys for evaluation helps prevent man-in-the-middle (MITM) attacks and other - vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged - to route all communication over an HTTPS connection with pinning enabled. - - - PerformDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to - validate the host provided by the challenge. Applications are encouraged to always - validate the host in production environments to guarantee the validity of the server's - certificate chain. - - - PinCertificates: Uses the pinned certificates to validate the server trust. The server trust is - considered valid if one of the pinned certificates match one of the server certificates. - By validating both the certificate chain and host, certificate pinning provides a very - secure form of server trust validation mitigating most, if not all, MITM attacks. - Applications are encouraged to always validate the host and require a valid certificate - chain in production environments. - - - PinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered - valid if one of the pinned public keys match one of the server certificate public keys. - By validating both the certificate chain and host, public key pinning provides a very - secure form of server trust validation mitigating most, if not all, MITM attacks. - Applications are encouraged to always validate the host and require a valid certificate - chain in production environments. - - - DisableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid. - - - CustomEvaluation: Uses the associated closure to evaluate the validity of the server trust. -*/ +/// The `ServerTrustPolicy` evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when +/// connecting to a server over a secure HTTPS connection. The policy configuration then evaluates the server trust +/// with a given set of criteria to determine whether the server trust is valid and the connection should be made. +/// +/// Using pinned certificates or public keys for evaluation helps prevent man-in-the-middle (MITM) attacks and other +/// vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged +/// to route all communication over an HTTPS connection with pinning enabled. +/// +/// - performDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to +/// validate the host provided by the challenge. Applications are encouraged to always +/// validate the host in production environments to guarantee the validity of the server's +/// certificate chain. +/// +/// - pinCertificates: Uses the pinned certificates to validate the server trust. The server trust is +/// considered valid if one of the pinned certificates match one of the server certificates. +/// By validating both the certificate chain and host, certificate pinning provides a very +/// secure form of server trust validation mitigating most, if not all, MITM attacks. +/// Applications are encouraged to always validate the host and require a valid certificate +/// chain in production environments. +/// +/// - pinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered +/// valid if one of the pinned public keys match one of the server certificate public keys. +/// By validating both the certificate chain and host, public key pinning provides a very +/// secure form of server trust validation mitigating most, if not all, MITM attacks. +/// Applications are encouraged to always validate the host and require a valid certificate +/// chain in production environments. +/// +/// - disableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid. +/// +/// - customEvaluation: Uses the associated closure to evaluate the validity of the server trust. public enum ServerTrustPolicy { - case PerformDefaultEvaluation(validateHost: Bool) - case PinCertificates(certificates: [SecCertificate], validateCertificateChain: Bool, validateHost: Bool) - case PinPublicKeys(publicKeys: [SecKey], validateCertificateChain: Bool, validateHost: Bool) - case DisableEvaluation - case CustomEvaluation((serverTrust: SecTrust, host: String) -> Bool) + case performDefaultEvaluation(validateHost: Bool) + case pinCertificates(certificates: [SecCertificate], validateCertificateChain: Bool, validateHost: Bool) + case pinPublicKeys(publicKeys: [SecKey], validateCertificateChain: Bool, validateHost: Bool) + case disableEvaluation + case customEvaluation((_ serverTrust: SecTrust, _ host: String) -> Bool) // MARK: - Bundle Location - /** - Returns all certificates within the given bundle with a `.cer` file extension. - - - parameter bundle: The bundle to search for all `.cer` files. - - - returns: All certificates within the given bundle. - */ - public static func certificatesInBundle(bundle: NSBundle = NSBundle.mainBundle()) -> [SecCertificate] { + /// Returns all certificates within the given bundle with a `.cer` file extension. + /// + /// - parameter bundle: The bundle to search for all `.cer` files. + /// + /// - returns: All certificates within the given bundle. + public static func certificates(in bundle: Bundle = Bundle.main) -> [SecCertificate] { var certificates: [SecCertificate] = [] let paths = Set([".cer", ".CER", ".crt", ".CRT", ".der", ".DER"].map { fileExtension in - bundle.pathsForResourcesOfType(fileExtension, inDirectory: nil) - }.flatten()) + bundle.paths(forResourcesOfType: fileExtension, inDirectory: nil) + }.joined()) for path in paths { - if let - certificateData = NSData(contentsOfFile: path), - certificate = SecCertificateCreateWithData(nil, certificateData) + if + let certificateData = try? Data(contentsOf: URL(fileURLWithPath: path)) as CFData, + let certificate = SecCertificateCreateWithData(nil, certificateData) { certificates.append(certificate) } @@ -146,18 +138,16 @@ public enum ServerTrustPolicy { return certificates } - /** - Returns all public keys within the given bundle with a `.cer` file extension. - - - parameter bundle: The bundle to search for all `*.cer` files. - - - returns: All public keys within the given bundle. - */ - public static func publicKeysInBundle(bundle: NSBundle = NSBundle.mainBundle()) -> [SecKey] { + /// Returns all public keys within the given bundle with a `.cer` file extension. + /// + /// - parameter bundle: The bundle to search for all `*.cer` files. + /// + /// - returns: All public keys within the given bundle. + public static func publicKeys(in bundle: Bundle = Bundle.main) -> [SecKey] { var publicKeys: [SecKey] = [] - for certificate in certificatesInBundle(bundle) { - if let publicKey = publicKeyForCertificate(certificate) { + for certificate in certificates(in: bundle) { + if let publicKey = publicKey(for: certificate) { publicKeys.append(publicKey) } } @@ -167,69 +157,55 @@ public enum ServerTrustPolicy { // MARK: - Evaluation - /** - Evaluates whether the server trust is valid for the given host. - - - parameter serverTrust: The server trust to evaluate. - - parameter host: The host of the challenge protection space. - - - returns: Whether the server trust is valid. - */ - public func evaluateServerTrust(serverTrust: SecTrust, isValidForHost host: String) -> Bool { + /// Evaluates whether the server trust is valid for the given host. + /// + /// - parameter serverTrust: The server trust to evaluate. + /// - parameter host: The host of the challenge protection space. + /// + /// - returns: Whether the server trust is valid. + public func evaluate(_ serverTrust: SecTrust, forHost host: String) -> Bool { var serverTrustIsValid = false switch self { - case let .PerformDefaultEvaluation(validateHost): + case let .performDefaultEvaluation(validateHost): let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - #if swift(>=2.3) - SecTrustSetPolicies(serverTrust, policy) - #else - SecTrustSetPolicies(serverTrust, [policy]) - #endif + SecTrustSetPolicies(serverTrust, policy) serverTrustIsValid = trustIsValid(serverTrust) - case let .PinCertificates(pinnedCertificates, validateCertificateChain, validateHost): + case let .pinCertificates(pinnedCertificates, validateCertificateChain, validateHost): if validateCertificateChain { let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - #if swift(>=2.3) SecTrustSetPolicies(serverTrust, policy) - #else - SecTrustSetPolicies(serverTrust, [policy]) - #endif - SecTrustSetAnchorCertificates(serverTrust, pinnedCertificates) + SecTrustSetAnchorCertificates(serverTrust, pinnedCertificates as CFArray) SecTrustSetAnchorCertificatesOnly(serverTrust, true) serverTrustIsValid = trustIsValid(serverTrust) } else { - let serverCertificatesDataArray = certificateDataForTrust(serverTrust) - let pinnedCertificatesDataArray = certificateDataForCertificates(pinnedCertificates) + let serverCertificatesDataArray = certificateData(for: serverTrust) + let pinnedCertificatesDataArray = certificateData(for: pinnedCertificates) outerLoop: for serverCertificateData in serverCertificatesDataArray { for pinnedCertificateData in pinnedCertificatesDataArray { - if serverCertificateData.isEqualToData(pinnedCertificateData) { + if serverCertificateData == pinnedCertificateData { serverTrustIsValid = true break outerLoop } } } } - case let .PinPublicKeys(pinnedPublicKeys, validateCertificateChain, validateHost): + case let .pinPublicKeys(pinnedPublicKeys, validateCertificateChain, validateHost): var certificateChainEvaluationPassed = true if validateCertificateChain { let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - #if swift(>=2.3) SecTrustSetPolicies(serverTrust, policy) - #else - SecTrustSetPolicies(serverTrust, [policy]) - #endif certificateChainEvaluationPassed = trustIsValid(serverTrust) } if certificateChainEvaluationPassed { - outerLoop: for serverPublicKey in ServerTrustPolicy.publicKeysForTrust(serverTrust) as [AnyObject] { + outerLoop: for serverPublicKey in ServerTrustPolicy.publicKeys(for: serverTrust) as [AnyObject] { for pinnedPublicKey in pinnedPublicKeys as [AnyObject] { if serverPublicKey.isEqual(pinnedPublicKey) { serverTrustIsValid = true @@ -238,10 +214,10 @@ public enum ServerTrustPolicy { } } } - case .DisableEvaluation: + case .disableEvaluation: serverTrustIsValid = true - case let .CustomEvaluation(closure): - serverTrustIsValid = closure(serverTrust: serverTrust, host: host) + case let .customEvaluation(closure): + serverTrustIsValid = closure(serverTrust, host) } return serverTrustIsValid @@ -249,24 +225,15 @@ public enum ServerTrustPolicy { // MARK: - Private - Trust Validation - private func trustIsValid(trust: SecTrust) -> Bool { + private func trustIsValid(_ trust: SecTrust) -> Bool { var isValid = false - #if swift(>=2.3) - var result = SecTrustResultType(rawValue: SecTrustResultType.Invalid.rawValue) - let status = SecTrustEvaluate(trust, &result!) - #else - var result = SecTrustResultType(SecTrustResultType.Invalid) + + var result = SecTrustResultType.invalid let status = SecTrustEvaluate(trust, &result) - #endif if status == errSecSuccess { - #if swift(>=2.3) - let unspecified = SecTrustResultType(rawValue: SecTrustResultType.Unspecified.rawValue) - let proceed = SecTrustResultType(rawValue: SecTrustResultType.Proceed.rawValue) - #else - let unspecified = SecTrustResultType(SecTrustResultType.Unspecified) - let proceed = SecTrustResultType(SecTrustResultType.Proceed) - #endif + let unspecified = SecTrustResultType.unspecified + let proceed = SecTrustResultType.proceed isValid = result == unspecified || result == proceed @@ -277,7 +244,7 @@ public enum ServerTrustPolicy { // MARK: - Private - Certificate Data - private func certificateDataForTrust(trust: SecTrust) -> [NSData] { + private func certificateData(for trust: SecTrust) -> [Data] { var certificates: [SecCertificate] = [] for index in 0.. [NSData] { - return certificates.map { SecCertificateCopyData($0) as NSData } + private func certificateData(for certificates: [SecCertificate]) -> [Data] { + return certificates.map { SecCertificateCopyData($0) as Data } } // MARK: - Private - Public Key Extraction - private static func publicKeysForTrust(trust: SecTrust) -> [SecKey] { + private static func publicKeys(for trust: SecTrust) -> [SecKey] { var publicKeys: [SecKey] = [] for index in 0.. SecKey? { + private static func publicKey(for certificate: SecCertificate) -> SecKey? { var publicKey: SecKey? let policy = SecPolicyCreateBasicX509() var trust: SecTrust? let trustCreationStatus = SecTrustCreateWithCertificates(certificate, policy, &trust) - if let trust = trust where trustCreationStatus == errSecSuccess { + if let trust = trust, trustCreationStatus == errSecSuccess { publicKey = SecTrustCopyPublicKey(trust) } diff --git a/Pods/Alamofire/Source/SessionDelegate.swift b/Pods/Alamofire/Source/SessionDelegate.swift new file mode 100644 index 0000000..a782786 --- /dev/null +++ b/Pods/Alamofire/Source/SessionDelegate.swift @@ -0,0 +1,681 @@ +// +// SessionDelegate.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// Responsible for handling all delegate callbacks for the underlying session. +open class SessionDelegate: NSObject { + + // MARK: URLSessionDelegate Overrides + + /// Overrides default behavior for URLSessionDelegate method `urlSession(_:didBecomeInvalidWithError:)`. + open var sessionDidBecomeInvalidWithError: ((URLSession, Error?) -> Void)? + + /// Overrides default behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)`. + open var sessionDidReceiveChallenge: ((URLSession, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + /// Overrides all behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)` and requires the caller to call the `completionHandler`. + open var sessionDidReceiveChallengeWithCompletion: ((URLSession, URLAuthenticationChallenge, (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? + + /// Overrides default behavior for URLSessionDelegate method `urlSessionDidFinishEvents(forBackgroundURLSession:)`. + open var sessionDidFinishEventsForBackgroundURLSession: ((URLSession) -> Void)? + + // MARK: URLSessionTaskDelegate Overrides + + /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)`. + open var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)? + + /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)` and + /// requires the caller to call the `completionHandler`. + open var taskWillPerformHTTPRedirectionWithCompletion: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest, (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)? + + /// 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)? + + /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)`. + open var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? + + /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didCompleteWithError:)`. + open var taskDidComplete: ((URLSession, URLSessionTask, Error?) -> Void)? + + // MARK: URLSessionDataDelegate Overrides + + /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:completionHandler:)`. + open var dataTaskDidReceiveResponse: ((URLSession, URLSessionDataTask, URLResponse) -> URLSession.ResponseDisposition)? + + /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:completionHandler:)` and + /// requires caller to call the `completionHandler`. + open var dataTaskDidReceiveResponseWithCompletion: ((URLSession, URLSessionDataTask, URLResponse, (URLSession.ResponseDisposition) -> Void) -> Void)? + + /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didBecome:)`. + open var dataTaskDidBecomeDownloadTask: ((URLSession, URLSessionDataTask, URLSessionDownloadTask) -> Void)? + + /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:)`. + open var dataTaskDidReceiveData: ((URLSession, URLSessionDataTask, Data) -> Void)? + + /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)`. + open var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)? + + /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)` and + /// requires caller to call the `completionHandler`. + open var dataTaskWillCacheResponseWithCompletion: ((URLSession, URLSessionDataTask, CachedURLResponse, (CachedURLResponse?) -> Void) -> Void)? + + // MARK: URLSessionDownloadDelegate Overrides + + /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didFinishDownloadingTo:)`. + open var downloadTaskDidFinishDownloadingToURL: ((URLSession, URLSessionDownloadTask, URL) -> Void)? + + /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:)`. + open var downloadTaskDidWriteData: ((URLSession, URLSessionDownloadTask, Int64, Int64, Int64) -> Void)? + + /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didResumeAtOffset:expectedTotalBytes:)`. + open var downloadTaskDidResumeAtOffset: ((URLSession, URLSessionDownloadTask, Int64, Int64) -> Void)? + + // MARK: URLSessionStreamDelegate Overrides + +#if !os(watchOS) + + /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:readClosedFor:)`. + open var streamTaskReadClosed: ((URLSession, URLSessionStreamTask) -> Void)? + + /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:writeClosedFor:)`. + open var streamTaskWriteClosed: ((URLSession, URLSessionStreamTask) -> Void)? + + /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:betterRouteDiscoveredFor:)`. + open var streamTaskBetterRouteDiscovered: ((URLSession, URLSessionStreamTask) -> Void)? + + /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:streamTask:didBecome:outputStream:)`. + open var streamTaskDidBecomeInputAndOutputStreams: ((URLSession, URLSessionStreamTask, InputStream, OutputStream) -> Void)? + +#endif + + // MARK: Properties + + var retrier: RequestRetrier? + weak var sessionManager: SessionManager? + + private var requests: [Int: Request] = [:] + private let lock = NSLock() + + /// Access the task delegate for the specified task in a thread-safe manner. + open subscript(task: URLSessionTask) -> Request? { + get { + lock.lock() ; defer { lock.unlock() } + return requests[task.taskIdentifier] + } + set { + lock.lock() ; defer { lock.unlock() } + requests[task.taskIdentifier] = newValue + } + } + + // MARK: Lifecycle + + /// Initializes the `SessionDelegate` instance. + /// + /// - returns: The new `SessionDelegate` instance. + public override init() { + super.init() + } + + // MARK: NSObject Overrides + + /// Returns a `Bool` indicating whether the `SessionDelegate` implements or inherits a method that can respond + /// to a specified message. + /// + /// - parameter selector: A selector that identifies a message. + /// + /// - returns: `true` if the receiver implements or inherits a method that can respond to selector, otherwise `false`. + open override func responds(to selector: Selector) -> Bool { + #if !os(OSX) + if selector == #selector(URLSessionDelegate.urlSessionDidFinishEvents(forBackgroundURLSession:)) { + return sessionDidFinishEventsForBackgroundURLSession != nil + } + #endif + + #if !os(watchOS) + switch selector { + case #selector(URLSessionStreamDelegate.urlSession(_:readClosedFor:)): + return streamTaskReadClosed != nil + case #selector(URLSessionStreamDelegate.urlSession(_:writeClosedFor:)): + return streamTaskWriteClosed != nil + case #selector(URLSessionStreamDelegate.urlSession(_:betterRouteDiscoveredFor:)): + return streamTaskBetterRouteDiscovered != nil + case #selector(URLSessionStreamDelegate.urlSession(_:streamTask:didBecome:outputStream:)): + return streamTaskDidBecomeInputAndOutputStreams != nil + default: + break + } + #endif + + switch selector { + case #selector(URLSessionDelegate.urlSession(_:didBecomeInvalidWithError:)): + return sessionDidBecomeInvalidWithError != nil + case #selector(URLSessionDelegate.urlSession(_:didReceive:completionHandler:)): + return (sessionDidReceiveChallenge != nil || sessionDidReceiveChallengeWithCompletion != nil) + case #selector(URLSessionTaskDelegate.urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)): + return (taskWillPerformHTTPRedirection != nil || taskWillPerformHTTPRedirectionWithCompletion != nil) + case #selector(URLSessionDataDelegate.urlSession(_:dataTask:didReceive:completionHandler:)): + return (dataTaskDidReceiveResponse != nil || dataTaskDidReceiveResponseWithCompletion != nil) + default: + return type(of: self).instancesRespond(to: selector) + } + } +} + +// MARK: - URLSessionDelegate + +extension SessionDelegate: URLSessionDelegate { + /// Tells the delegate that the session has been invalidated. + /// + /// - parameter session: The session object that was invalidated. + /// - parameter error: The error that caused invalidation, or nil if the invalidation was explicit. + open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) { + sessionDidBecomeInvalidWithError?(session, error) + } + + /// Requests credentials from the delegate in response to a session-level authentication request from the + /// remote server. + /// + /// - parameter session: The session containing the task that requested authentication. + /// - parameter challenge: An object that contains the request for authentication. + /// - parameter completionHandler: A handler that your delegate method must call providing the disposition + /// and credential. + open func urlSession( + _ session: URLSession, + didReceive challenge: URLAuthenticationChallenge, + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) + { + guard sessionDidReceiveChallengeWithCompletion == nil else { + sessionDidReceiveChallengeWithCompletion?(session, challenge, completionHandler) + return + } + + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + var credential: URLCredential? + + if let sessionDidReceiveChallenge = sessionDidReceiveChallenge { + (disposition, credential) = sessionDidReceiveChallenge(session, challenge) + } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { + let host = challenge.protectionSpace.host + + if + let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicy(forHost: host), + let serverTrust = challenge.protectionSpace.serverTrust + { + if serverTrustPolicy.evaluate(serverTrust, forHost: host) { + disposition = .useCredential + credential = URLCredential(trust: serverTrust) + } else { + disposition = .cancelAuthenticationChallenge + } + } + } + + completionHandler(disposition, credential) + } + +#if !os(OSX) + + /// Tells the delegate that all messages enqueued for a session have been delivered. + /// + /// - parameter session: The session that no longer has any outstanding requests. + open func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) { + sessionDidFinishEventsForBackgroundURLSession?(session) + } + +#endif +} + +// MARK: - URLSessionTaskDelegate + +extension SessionDelegate: URLSessionTaskDelegate { + /// Tells the delegate that the remote server requested an HTTP redirect. + /// + /// - parameter session: The session containing the task whose request resulted in a redirect. + /// - parameter task: The task whose request resulted in a redirect. + /// - parameter response: An object containing the server’s response to the original request. + /// - parameter request: A URL request object filled out with the new location. + /// - parameter completionHandler: A closure that your handler should call with either the value of the request + /// parameter, a modified URL request object, or NULL to refuse the redirect and + /// return the body of the redirect response. + open func urlSession( + _ session: URLSession, + task: URLSessionTask, + willPerformHTTPRedirection response: HTTPURLResponse, + newRequest request: URLRequest, + completionHandler: @escaping (URLRequest?) -> Void) + { + guard taskWillPerformHTTPRedirectionWithCompletion == nil else { + taskWillPerformHTTPRedirectionWithCompletion?(session, task, response, request, completionHandler) + return + } + + var redirectRequest: URLRequest? = request + + if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { + redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) + } + + completionHandler(redirectRequest) + } + + /// Requests credentials from the delegate in response to an authentication request from the remote server. + /// + /// - parameter session: The session containing the task whose request requires authentication. + /// - parameter task: The task whose request requires authentication. + /// - parameter challenge: An object that contains the request for authentication. + /// - parameter completionHandler: A handler that your delegate method must call providing the disposition + /// and credential. + open func urlSession( + _ session: URLSession, + task: URLSessionTask, + didReceive challenge: URLAuthenticationChallenge, + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) + { + guard taskDidReceiveChallengeWithCompletion == nil else { + taskDidReceiveChallengeWithCompletion?(session, task, challenge, completionHandler) + return + } + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + let result = taskDidReceiveChallenge(session, task, challenge) + completionHandler(result.0, result.1) + } else if let delegate = self[task]?.delegate { + delegate.urlSession( + session, + task: task, + didReceive: challenge, + completionHandler: completionHandler + ) + } else { + urlSession(session, didReceive: challenge, completionHandler: completionHandler) + } + } + + /// Tells the delegate when a task requires a new request body stream to send to the remote server. + /// + /// - parameter session: The session containing the task that needs a new body stream. + /// - parameter task: The task that needs a new body stream. + /// - parameter completionHandler: A completion handler that your delegate method should call with the new body stream. + open func urlSession( + _ session: URLSession, + task: URLSessionTask, + needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) + { + guard taskNeedNewBodyStreamWithCompletion == nil else { + taskNeedNewBodyStreamWithCompletion?(session, task, completionHandler) + return + } + + if let taskNeedNewBodyStream = taskNeedNewBodyStream { + completionHandler(taskNeedNewBodyStream(session, task)) + } else if let delegate = self[task]?.delegate { + delegate.urlSession(session, task: task, needNewBodyStream: completionHandler) + } + } + + /// Periodically informs the delegate of the progress of sending body content to the server. + /// + /// - parameter session: The session containing the data task. + /// - parameter task: The data task. + /// - parameter bytesSent: The number of bytes sent since the last time this delegate method was called. + /// - parameter totalBytesSent: The total number of bytes sent so far. + /// - parameter totalBytesExpectedToSend: The expected length of the body data. + open func urlSession( + _ session: URLSession, + task: URLSessionTask, + didSendBodyData bytesSent: Int64, + totalBytesSent: Int64, + totalBytesExpectedToSend: Int64) + { + if let taskDidSendBodyData = taskDidSendBodyData { + taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) + } else if let delegate = self[task]?.delegate as? UploadTaskDelegate { + delegate.URLSession( + session, + task: task, + didSendBodyData: bytesSent, + totalBytesSent: totalBytesSent, + totalBytesExpectedToSend: totalBytesExpectedToSend + ) + } + } + +#if !os(watchOS) + + /// Tells the delegate that the session finished collecting metrics for the task. + /// + /// - parameter session: The session collecting the metrics. + /// - parameter task: The task whose metrics have been collected. + /// - parameter metrics: The collected metrics. + @available(iOS 10.0, macOS 10.12, tvOS 10.0, *) + @objc(URLSession:task:didFinishCollectingMetrics:) + open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) { + self[task]?.delegate.metrics = metrics + } + +#endif + + /// Tells the delegate that the task finished transferring data. + /// + /// - parameter session: The session containing the task whose request finished transferring data. + /// - parameter task: The task whose request finished transferring data. + /// - parameter error: If an error occurred, an error object indicating how the transfer failed, otherwise nil. + open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { + /// Executed after it is determined that the request is not going to be retried + let completeTask: (URLSession, URLSessionTask, Error?) -> Void = { [weak self] session, task, error in + guard let strongSelf = self else { return } + + if let taskDidComplete = strongSelf.taskDidComplete { + taskDidComplete(session, task, error) + } else if let delegate = strongSelf[task]?.delegate { + delegate.urlSession(session, task: task, didCompleteWithError: error) + } + + NotificationCenter.default.post( + name: Notification.Name.Task.DidComplete, + object: strongSelf, + userInfo: [Notification.Key.Task: task] + ) + + strongSelf[task] = nil + } + + guard let request = self[task], let sessionManager = sessionManager else { + completeTask(session, task, error) + return + } + + // Run all validations on the request before checking if an error occurred + request.validations.forEach { $0() } + + // Determine whether an error has occurred + var error: Error? = error + + if let taskDelegate = self[task]?.delegate, taskDelegate.error != nil { + error = taskDelegate.error + } + + /// If an error occurred and the retrier is set, asynchronously ask the retrier if the request + /// should be retried. Otherwise, complete the task by notifying the task delegate. + if let retrier = retrier, let error = error { + retrier.should(sessionManager, retry: request, with: error) { [weak self] shouldRetry, delay in + guard shouldRetry else { completeTask(session, task, error) ; return } + + DispatchQueue.utility.after(delay) { [weak self] in + guard let strongSelf = self else { return } + + let retrySucceeded = strongSelf.sessionManager?.retry(request) ?? false + + if retrySucceeded, let task = request.task { + strongSelf[task] = request + return + } else { + completeTask(session, task, error) + } + } + } + } else { + completeTask(session, task, error) + } + } +} + +// MARK: - URLSessionDataDelegate + +extension SessionDelegate: URLSessionDataDelegate { + /// Tells the delegate that the data task received the initial reply (headers) from the server. + /// + /// - parameter session: The session containing the data task that received an initial reply. + /// - parameter dataTask: The data task that received an initial reply. + /// - parameter response: A URL response object populated with headers. + /// - parameter completionHandler: A completion handler that your code calls to continue the transfer, passing a + /// constant to indicate whether the transfer should continue as a data task or + /// should become a download task. + open func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + didReceive response: URLResponse, + completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) + { + guard dataTaskDidReceiveResponseWithCompletion == nil else { + dataTaskDidReceiveResponseWithCompletion?(session, dataTask, response, completionHandler) + return + } + + var disposition: URLSession.ResponseDisposition = .allow + + if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { + disposition = dataTaskDidReceiveResponse(session, dataTask, response) + } + + completionHandler(disposition) + } + + /// Tells the delegate that the data task was changed to a download task. + /// + /// - parameter session: The session containing the task that was replaced by a download task. + /// - parameter dataTask: The data task that was replaced by a download task. + /// - parameter downloadTask: The new download task that replaced the data task. + open func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + didBecome downloadTask: URLSessionDownloadTask) + { + if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask { + dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask) + } else { + self[downloadTask]?.delegate = DownloadTaskDelegate(task: downloadTask) + } + } + + /// Tells the delegate that the data task has received some of the expected data. + /// + /// - parameter session: The session containing the data task that provided data. + /// - parameter dataTask: The data task that provided data. + /// - parameter data: A data object containing the transferred data. + open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { + if let dataTaskDidReceiveData = dataTaskDidReceiveData { + dataTaskDidReceiveData(session, dataTask, data) + } else if let delegate = self[dataTask]?.delegate as? DataTaskDelegate { + delegate.urlSession(session, dataTask: dataTask, didReceive: data) + } + } + + /// Asks the delegate whether the data (or upload) task should store the response in the cache. + /// + /// - parameter session: The session containing the data (or upload) task. + /// - parameter dataTask: The data (or upload) task. + /// - parameter proposedResponse: The default caching behavior. This behavior is determined based on the current + /// caching policy and the values of certain received headers, such as the Pragma + /// and Cache-Control headers. + /// - parameter completionHandler: A block that your handler must call, providing either the original proposed + /// response, a modified version of that response, or NULL to prevent caching the + /// response. If your delegate implements this method, it must call this completion + /// handler; otherwise, your app leaks memory. + open func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + willCacheResponse proposedResponse: CachedURLResponse, + completionHandler: @escaping (CachedURLResponse?) -> Void) + { + guard dataTaskWillCacheResponseWithCompletion == nil else { + dataTaskWillCacheResponseWithCompletion?(session, dataTask, proposedResponse, completionHandler) + return + } + + if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { + completionHandler(dataTaskWillCacheResponse(session, dataTask, proposedResponse)) + } else if let delegate = self[dataTask]?.delegate as? DataTaskDelegate { + delegate.urlSession( + session, + dataTask: dataTask, + willCacheResponse: proposedResponse, + completionHandler: completionHandler + ) + } else { + completionHandler(proposedResponse) + } + } +} + +// MARK: - URLSessionDownloadDelegate + +extension SessionDelegate: URLSessionDownloadDelegate { + /// Tells the delegate that a download task has finished downloading. + /// + /// - parameter session: The session containing the download task that finished. + /// - parameter downloadTask: The download task that finished. + /// - parameter location: A file URL for the temporary file. Because the file is temporary, you must either + /// open the file for reading or move it to a permanent location in your app’s sandbox + /// container directory before returning from this delegate method. + open func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didFinishDownloadingTo location: URL) + { + if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { + downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) + } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { + delegate.urlSession(session, downloadTask: downloadTask, didFinishDownloadingTo: location) + } + } + + /// Periodically informs the delegate about the download’s progress. + /// + /// - parameter session: The session containing the download task. + /// - parameter downloadTask: The download task. + /// - parameter bytesWritten: The number of bytes transferred since the last time this delegate + /// method was called. + /// - parameter totalBytesWritten: The total number of bytes transferred so far. + /// - parameter totalBytesExpectedToWrite: The expected length of the file, as provided by the Content-Length + /// header. If this header was not provided, the value is + /// `NSURLSessionTransferSizeUnknown`. + open func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didWriteData bytesWritten: Int64, + totalBytesWritten: Int64, + totalBytesExpectedToWrite: Int64) + { + if let downloadTaskDidWriteData = downloadTaskDidWriteData { + downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) + } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { + delegate.urlSession( + session, + downloadTask: downloadTask, + didWriteData: bytesWritten, + totalBytesWritten: totalBytesWritten, + totalBytesExpectedToWrite: totalBytesExpectedToWrite + ) + } + } + + /// Tells the delegate that the download task has resumed downloading. + /// + /// - parameter session: The session containing the download task that finished. + /// - parameter downloadTask: The download task that resumed. See explanation in the discussion. + /// - parameter fileOffset: If the file's cache policy or last modified date prevents reuse of the + /// existing content, then this value is zero. Otherwise, this value is an + /// integer representing the number of bytes on disk that do not need to be + /// retrieved again. + /// - parameter expectedTotalBytes: The expected length of the file, as provided by the Content-Length header. + /// If this header was not provided, the value is NSURLSessionTransferSizeUnknown. + open func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didResumeAtOffset fileOffset: Int64, + expectedTotalBytes: Int64) + { + if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { + downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) + } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { + delegate.urlSession( + session, + downloadTask: downloadTask, + didResumeAtOffset: fileOffset, + expectedTotalBytes: expectedTotalBytes + ) + } + } +} + +// MARK: - URLSessionStreamDelegate + +#if !os(watchOS) + +extension SessionDelegate: URLSessionStreamDelegate { + /// Tells the delegate that the read side of the connection has been closed. + /// + /// - parameter session: The session. + /// - parameter streamTask: The stream task. + open func urlSession(_ session: URLSession, readClosedFor streamTask: URLSessionStreamTask) { + streamTaskReadClosed?(session, streamTask) + } + + /// Tells the delegate that the write side of the connection has been closed. + /// + /// - parameter session: The session. + /// - parameter streamTask: The stream task. + open func urlSession(_ session: URLSession, writeClosedFor streamTask: URLSessionStreamTask) { + streamTaskWriteClosed?(session, streamTask) + } + + /// Tells the delegate that the system has determined that a better route to the host is available. + /// + /// - parameter session: The session. + /// - parameter streamTask: The stream task. + open func urlSession(_ session: URLSession, betterRouteDiscoveredFor streamTask: URLSessionStreamTask) { + streamTaskBetterRouteDiscovered?(session, streamTask) + } + + /// Tells the delegate that the stream task has been completed and provides the unopened stream objects. + /// + /// - parameter session: The session. + /// - parameter streamTask: The stream task. + /// - parameter inputStream: The new input stream. + /// - parameter outputStream: The new output stream. + open func urlSession( + _ session: URLSession, + streamTask: URLSessionStreamTask, + didBecome inputStream: InputStream, + outputStream: OutputStream) + { + streamTaskDidBecomeInputAndOutputStreams?(session, streamTask, inputStream, outputStream) + } +} + +#endif diff --git a/Pods/Alamofire/Source/SessionManager.swift b/Pods/Alamofire/Source/SessionManager.swift new file mode 100644 index 0000000..376171b --- /dev/null +++ b/Pods/Alamofire/Source/SessionManager.swift @@ -0,0 +1,776 @@ +// +// SessionManager.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// Responsible for creating and managing `Request` objects, as well as their underlying `NSURLSession`. +open class SessionManager { + + // MARK: - Helper Types + + /// Defines whether the `MultipartFormData` encoding was successful and contains result of the encoding as + /// associated values. + /// + /// - Success: Represents a successful `MultipartFormData` encoding and contains the new `UploadRequest` along with + /// streaming information. + /// - Failure: Used to represent a failure in the `MultipartFormData` encoding and also contains the encoding + /// error. + public enum MultipartFormDataEncodingResult { + case success(request: UploadRequest, streamingFromDisk: Bool, streamFileURL: URL?) + case failure(Error) + } + + // MARK: - Properties + + /// A default instance of `SessionManager`, used by top-level Alamofire request methods, and suitable for use + /// directly for any ad hoc requests. + open static let `default`: SessionManager = { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = SessionManager.defaultHTTPHeaders + + return SessionManager(configuration: configuration) + }() + + /// Creates default values for the "Accept-Encoding", "Accept-Language" and "User-Agent" headers. + open static let defaultHTTPHeaders: HTTPHeaders = { + // Accept-Encoding HTTP Header; see https://tools.ietf.org/html/rfc7230#section-4.2.3 + let acceptEncoding: String = "gzip;q=1.0, compress;q=0.5" + + // Accept-Language HTTP Header; see https://tools.ietf.org/html/rfc7231#section-5.3.5 + let acceptLanguage = Locale.preferredLanguages.prefix(6).enumerated().map { index, languageCode in + let quality = 1.0 - (Double(index) * 0.1) + return "\(languageCode);q=\(quality)" + }.joined(separator: ", ") + + // User-Agent Header; see https://tools.ietf.org/html/rfc7231#section-5.5.3 + // Example: `iOS Example/1.0 (com.alamofire.iOS-Example; build:1; iOS 9.3.0) Alamofire/3.4.2` + let userAgent: String = { + if let info = Bundle.main.infoDictionary { + let executable = info[kCFBundleExecutableKey as String] as? String ?? "Unknown" + let bundle = info[kCFBundleIdentifierKey as String] as? String ?? "Unknown" + let appVersion = info["CFBundleShortVersionString"] as? String ?? "Unknown" + let appBuild = info[kCFBundleVersionKey as String] as? String ?? "Unknown" + + let osNameVersion: String = { + let version = ProcessInfo.processInfo.operatingSystemVersion + let versionString = "\(version.majorVersion).\(version.minorVersion).\(version.patchVersion)" + + let osName: String = { + #if os(iOS) + return "iOS" + #elseif os(watchOS) + return "watchOS" + #elseif os(tvOS) + return "tvOS" + #elseif os(OSX) + return "OS X" + #elseif os(Linux) + return "Linux" + #else + return "Unknown" + #endif + }() + + return "\(osName) \(versionString)" + }() + + let alamofireVersion: String = { + guard + let afInfo = Bundle(for: SessionManager.self).infoDictionary, + let build = afInfo["CFBundleShortVersionString"] + else { return "Unknown" } + + return "Alamofire/\(build)" + }() + + return "\(executable)/\(appVersion) (\(bundle); build:\(appBuild); \(osNameVersion)) \(alamofireVersion)" + } + + return "Alamofire" + }() + + return [ + "Accept-Encoding": acceptEncoding, + "Accept-Language": acceptLanguage, + "User-Agent": userAgent + ] + }() + + /// Default memory threshold used when encoding `MultipartFormData` in bytes. + open static let multipartFormDataEncodingMemoryThreshold: UInt64 = 10_000_000 + + /// The underlying session. + open let session: URLSession + + /// The session delegate handling all the task and session delegate callbacks. + open let delegate: SessionDelegate + + /// Whether to start requests immediately after being constructed. `true` by default. + open var startRequestsImmediately: Bool = true + + /// The request adapter called each time a new request is created. + open var adapter: RequestAdapter? + + /// The request retrier called each time a request encounters an error to determine whether to retry the request. + open var retrier: RequestRetrier? { + get { return delegate.retrier } + set { delegate.retrier = newValue } + } + + /// The background completion handler closure provided by the UIApplicationDelegate + /// `application:handleEventsForBackgroundURLSession:completionHandler:` method. By setting the background + /// completion handler, the SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` closure implementation + /// will automatically call the handler. + /// + /// If you need to handle your own events before the handler is called, then you need to override the + /// SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` and manually call the handler when finished. + /// + /// `nil` by default. + open var backgroundCompletionHandler: (() -> Void)? + + let queue = DispatchQueue(label: "org.alamofire.session-manager." + UUID().uuidString) + + // MARK: - Lifecycle + + /// Creates an instance with the specified `configuration`, `delegate` and `serverTrustPolicyManager`. + /// + /// - parameter configuration: The configuration used to construct the managed session. + /// `URLSessionConfiguration.default` by default. + /// - parameter delegate: The delegate used when initializing the session. `SessionDelegate()` by + /// default. + /// - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust + /// challenges. `nil` by default. + /// + /// - returns: The new `SessionManager` instance. + public init( + configuration: URLSessionConfiguration = URLSessionConfiguration.default, + delegate: SessionDelegate = SessionDelegate(), + serverTrustPolicyManager: ServerTrustPolicyManager? = nil) + { + self.delegate = delegate + self.session = URLSession(configuration: configuration, delegate: delegate, delegateQueue: nil) + + commonInit(serverTrustPolicyManager: serverTrustPolicyManager) + } + + /// Creates an instance with the specified `session`, `delegate` and `serverTrustPolicyManager`. + /// + /// - parameter session: The URL session. + /// - parameter delegate: The delegate of the URL session. Must equal the URL session's delegate. + /// - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust + /// challenges. `nil` by default. + /// + /// - returns: The new `SessionManager` instance if the URL session's delegate matches; `nil` otherwise. + public init?( + session: URLSession, + delegate: SessionDelegate, + serverTrustPolicyManager: ServerTrustPolicyManager? = nil) + { + guard delegate === session.delegate else { return nil } + + self.delegate = delegate + self.session = session + + commonInit(serverTrustPolicyManager: serverTrustPolicyManager) + } + + private func commonInit(serverTrustPolicyManager: ServerTrustPolicyManager?) { + session.serverTrustPolicyManager = serverTrustPolicyManager + + delegate.sessionManager = self + + delegate.sessionDidFinishEventsForBackgroundURLSession = { [weak self] session in + guard let strongSelf = self else { return } + DispatchQueue.main.async { strongSelf.backgroundCompletionHandler?() } + } + } + + deinit { + session.invalidateAndCancel() + } + + // MARK: - Data Request + + /// Creates a `DataRequest` to retrieve the contents of the specified `url`, `method`, `parameters`, `encoding` + /// and `headers`. + /// + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.get` by default. + /// - parameter parameters: The parameters. `nil` by default. + /// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// + /// - returns: The created `DataRequest`. + @discardableResult + open func request( + _ url: URLConvertible, + method: HTTPMethod = .get, + parameters: Parameters? = nil, + encoding: ParameterEncoding = URLEncoding.default, + headers: HTTPHeaders? = nil) + -> DataRequest + { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + let encodedURLRequest = try encoding.encode(urlRequest, with: parameters) + return request(encodedURLRequest) + } catch { + return request(failedWith: error) + } + } + + /// Creates a `DataRequest` to retrieve the contents of a URL based on the specified `urlRequest`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter urlRequest: The URL request. + /// + /// - returns: The created `DataRequest`. + open func request(_ urlRequest: URLRequestConvertible) -> DataRequest { + do { + let originalRequest = try urlRequest.asURLRequest() + let originalTask = DataRequest.Requestable(urlRequest: originalRequest) + + let task = try originalTask.task(session: session, adapter: adapter, queue: queue) + let request = DataRequest(session: session, requestTask: .data(originalTask, task)) + + delegate[task] = request + + if startRequestsImmediately { request.resume() } + + return request + } catch { + return request(failedWith: error) + } + } + + // MARK: Private - Request Implementation + + private func request(failedWith error: Error) -> DataRequest { + let request = DataRequest(session: session, requestTask: .data(nil, nil), error: error) + if startRequestsImmediately { request.resume() } + return request + } + + // MARK: - Download Request + + // MARK: URL Request + + /// Creates a `DownloadRequest` to retrieve the contents the specified `url`, `method`, `parameters`, `encoding`, + /// `headers` and save them to the `destination`. + /// + /// If `destination` is not specified, the contents will remain in the temporary location determined by the + /// underlying URL session. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.get` by default. + /// - parameter parameters: The parameters. `nil` by default. + /// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. + /// + /// - returns: The created `DownloadRequest`. + @discardableResult + open func download( + _ url: URLConvertible, + method: HTTPMethod = .get, + parameters: Parameters? = nil, + encoding: ParameterEncoding = URLEncoding.default, + headers: HTTPHeaders? = nil, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest + { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + let encodedURLRequest = try encoding.encode(urlRequest, with: parameters) + return download(encodedURLRequest, to: destination) + } catch { + return download(failedWith: error) + } + } + + /// Creates a `DownloadRequest` to retrieve the contents of a URL based on the specified `urlRequest` and save + /// them to the `destination`. + /// + /// If `destination` is not specified, the contents will remain in the temporary location determined by the + /// underlying URL session. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter urlRequest: The URL request + /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. + /// + /// - returns: The created `DownloadRequest`. + @discardableResult + open func download( + _ urlRequest: URLRequestConvertible, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest + { + do { + let urlRequest = try urlRequest.asURLRequest() + return download(.request(urlRequest), to: destination) + } catch { + return download(failedWith: error) + } + } + + // MARK: Resume Data + + /// Creates a `DownloadRequest` from the `resumeData` produced from a previous request cancellation to retrieve + /// the contents of the original request and save them to the `destination`. + /// + /// If `destination` is not specified, the contents will remain in the temporary location determined by the + /// underlying URL session. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter resumeData: The resume data. This is an opaque data blob produced by `URLSessionDownloadTask` + /// when a task is cancelled. See `URLSession -downloadTask(withResumeData:)` for + /// additional information. + /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. + /// + /// - returns: The created `DownloadRequest`. + @discardableResult + open func download( + resumingWith resumeData: Data, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest + { + return download(.resumeData(resumeData), to: destination) + } + + // MARK: Private - Download Implementation + + private func download( + _ downloadable: DownloadRequest.Downloadable, + to destination: DownloadRequest.DownloadFileDestination?) + -> DownloadRequest + { + do { + let task = try downloadable.task(session: session, adapter: adapter, queue: queue) + let request = DownloadRequest(session: session, requestTask: .download(downloadable, task)) + + request.downloadDelegate.destination = destination + + delegate[task] = request + + if startRequestsImmediately { request.resume() } + + return request + } catch { + return download(failedWith: error) + } + } + + private func download(failedWith error: Error) -> DownloadRequest { + let download = DownloadRequest(session: session, requestTask: .download(nil, nil), error: error) + if startRequestsImmediately { download.resume() } + return download + } + + // MARK: - Upload Request + + // MARK: File + + /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `file`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter file: The file to upload. + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.post` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload( + _ fileURL: URL, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest + { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + return upload(fileURL, with: urlRequest) + } catch { + return upload(failedWith: error) + } + } + + /// Creates a `UploadRequest` from the specified `urlRequest` for uploading the `file`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter file: The file to upload. + /// - parameter urlRequest: The URL request. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest { + do { + let urlRequest = try urlRequest.asURLRequest() + return upload(.file(fileURL, urlRequest)) + } catch { + return upload(failedWith: error) + } + } + + // MARK: Data + + /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `data`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter data: The data to upload. + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.post` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload( + _ data: Data, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest + { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + return upload(data, with: urlRequest) + } catch { + return upload(failedWith: error) + } + } + + /// Creates an `UploadRequest` from the specified `urlRequest` for uploading the `data`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter data: The data to upload. + /// - parameter urlRequest: The URL request. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest { + do { + let urlRequest = try urlRequest.asURLRequest() + return upload(.data(data, urlRequest)) + } catch { + return upload(failedWith: error) + } + } + + // MARK: InputStream + + /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `stream`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter stream: The stream to upload. + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.post` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload( + _ stream: InputStream, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest + { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + return upload(stream, with: urlRequest) + } catch { + return upload(failedWith: error) + } + } + + /// Creates an `UploadRequest` from the specified `urlRequest` for uploading the `stream`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter stream: The stream to upload. + /// - parameter urlRequest: The URL request. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest { + do { + let urlRequest = try urlRequest.asURLRequest() + return upload(.stream(stream, urlRequest)) + } catch { + return upload(failedWith: error) + } + } + + // MARK: MultipartFormData + + /// Encodes `multipartFormData` using `encodingMemoryThreshold` and calls `encodingCompletion` with new + /// `UploadRequest` using the `url`, `method` and `headers`. + /// + /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative + /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most + /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to + /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory + /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be + /// used for larger payloads such as video content. + /// + /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory + /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, + /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk + /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding + /// technique was used. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. + /// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. + /// `multipartFormDataEncodingMemoryThreshold` by default. + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.post` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. + open func upload( + multipartFormData: @escaping (MultipartFormData) -> Void, + usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil, + encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) + { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + + return upload( + multipartFormData: multipartFormData, + usingThreshold: encodingMemoryThreshold, + with: urlRequest, + encodingCompletion: encodingCompletion + ) + } catch { + DispatchQueue.main.async { encodingCompletion?(.failure(error)) } + } + } + + /// Encodes `multipartFormData` using `encodingMemoryThreshold` and calls `encodingCompletion` with new + /// `UploadRequest` using the `urlRequest`. + /// + /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative + /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most + /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to + /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory + /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be + /// used for larger payloads such as video content. + /// + /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory + /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, + /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk + /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding + /// technique was used. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. + /// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. + /// `multipartFormDataEncodingMemoryThreshold` by default. + /// - parameter urlRequest: The URL request. + /// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. + open func upload( + multipartFormData: @escaping (MultipartFormData) -> Void, + usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, + with urlRequest: URLRequestConvertible, + encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) + { + DispatchQueue.global(qos: .utility).async { + let formData = MultipartFormData() + multipartFormData(formData) + + do { + var urlRequestWithContentType = try urlRequest.asURLRequest() + urlRequestWithContentType.setValue(formData.contentType, forHTTPHeaderField: "Content-Type") + + let isBackgroundSession = self.session.configuration.identifier != nil + + if formData.contentLength < encodingMemoryThreshold && !isBackgroundSession { + let data = try formData.encode() + + let encodingResult = MultipartFormDataEncodingResult.success( + request: self.upload(data, with: urlRequestWithContentType), + streamingFromDisk: false, + streamFileURL: nil + ) + + DispatchQueue.main.async { encodingCompletion?(encodingResult) } + } else { + let fileManager = FileManager.default + let tempDirectoryURL = URL(fileURLWithPath: NSTemporaryDirectory()) + let directoryURL = tempDirectoryURL.appendingPathComponent("org.alamofire.manager/multipart.form.data") + let fileName = UUID().uuidString + let fileURL = directoryURL.appendingPathComponent(fileName) + + var directoryError: Error? + + // Create directory inside serial queue to ensure two threads don't do this in parallel + self.queue.sync { + do { + try fileManager.createDirectory(at: directoryURL, withIntermediateDirectories: true, attributes: nil) + } catch { + directoryError = error + } + } + + if let directoryError = directoryError { throw directoryError } + + try formData.writeEncodedData(to: fileURL) + + DispatchQueue.main.async { + let encodingResult = MultipartFormDataEncodingResult.success( + request: self.upload(fileURL, with: urlRequestWithContentType), + streamingFromDisk: true, + streamFileURL: fileURL + ) + encodingCompletion?(encodingResult) + } + } + } catch { + DispatchQueue.main.async { encodingCompletion?(.failure(error)) } + } + } + } + + // MARK: Private - Upload Implementation + + private func upload(_ uploadable: UploadRequest.Uploadable) -> UploadRequest { + do { + let task = try uploadable.task(session: session, adapter: adapter, queue: queue) + let upload = UploadRequest(session: session, requestTask: .upload(uploadable, task)) + + if case let .stream(inputStream, _) = uploadable { + upload.delegate.taskNeedNewBodyStream = { _, _ in inputStream } + } + + delegate[task] = upload + + if startRequestsImmediately { upload.resume() } + + return upload + } catch { + return upload(failedWith: error) + } + } + + private func upload(failedWith error: Error) -> UploadRequest { + let upload = UploadRequest(session: session, requestTask: .upload(nil, nil), error: error) + if startRequestsImmediately { upload.resume() } + return upload + } + +#if !os(watchOS) + + // MARK: - Stream Request + + // MARK: Hostname and Port + + /// Creates a `StreamRequest` for bidirectional streaming using the `hostname` and `port`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter hostName: The hostname of the server to connect to. + /// - parameter port: The port of the server to connect to. + /// + /// - returns: The created `StreamRequest`. + @discardableResult + open func stream(withHostName hostName: String, port: Int) -> StreamRequest { + return stream(.stream(hostName: hostName, port: port)) + } + + // MARK: NetService + + /// Creates a `StreamRequest` for bidirectional streaming using the `netService`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter netService: The net service used to identify the endpoint. + /// + /// - returns: The created `StreamRequest`. + @discardableResult + open func stream(with netService: NetService) -> StreamRequest { + return stream(.netService(netService)) + } + + // MARK: Private - Stream Implementation + + private func stream(_ streamable: StreamRequest.Streamable) -> StreamRequest { + do { + let task = try streamable.task(session: session, adapter: adapter, queue: queue) + let request = StreamRequest(session: session, requestTask: .stream(streamable, task)) + + delegate[task] = request + + if startRequestsImmediately { request.resume() } + + return request + } catch { + return stream(failedWith: error) + } + } + + private func stream(failedWith error: Error) -> StreamRequest { + let stream = StreamRequest(session: session, requestTask: .stream(nil, nil), error: error) + if startRequestsImmediately { stream.resume() } + return stream + } + +#endif + + // MARK: - Internal - Retry Request + + func retry(_ request: Request) -> Bool { + guard let originalTask = request.originalTask else { return false } + + do { + let task = try originalTask.task(session: session, adapter: adapter, queue: queue) + + request.delegate.task = task // resets all task delegate data + + request.startTime = CFAbsoluteTimeGetCurrent() + request.endTime = nil + + task.resume() + + return true + } catch { + request.delegate.error = error + return false + } + } +} diff --git a/Pods/Alamofire/Source/Stream.swift b/Pods/Alamofire/Source/Stream.swift deleted file mode 100644 index e463d9b..0000000 --- a/Pods/Alamofire/Source/Stream.swift +++ /dev/null @@ -1,182 +0,0 @@ -// -// Stream.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -#if !os(watchOS) - -@available(iOS 9.0, OSX 10.11, tvOS 9.0, *) -extension Manager { - private enum Streamable { - case Stream(String, Int) - case NetService(NSNetService) - } - - private func stream(streamable: Streamable) -> Request { - var streamTask: NSURLSessionStreamTask! - - switch streamable { - case .Stream(let hostName, let port): - dispatch_sync(queue) { - streamTask = self.session.streamTaskWithHostName(hostName, port: port) - } - case .NetService(let netService): - dispatch_sync(queue) { - streamTask = self.session.streamTaskWithNetService(netService) - } - } - - let request = Request(session: session, task: streamTask) - - delegate[request.delegate.task] = request.delegate - - if startRequestsImmediately { - request.resume() - } - - return request - } - - /** - Creates a request for bidirectional streaming with the given hostname and port. - - - parameter hostName: The hostname of the server to connect to. - - parameter port: The port of the server to connect to. - - - returns: The created stream request. - */ - public func stream(hostName hostName: String, port: Int) -> Request { - return stream(.Stream(hostName, port)) - } - - /** - Creates a request for bidirectional streaming with the given `NSNetService`. - - - parameter netService: The net service used to identify the endpoint. - - - returns: The created stream request. - */ - public func stream(netService netService: NSNetService) -> Request { - return stream(.NetService(netService)) - } -} - -// MARK: - - -@available(iOS 9.0, OSX 10.11, tvOS 9.0, *) -extension Manager.SessionDelegate: NSURLSessionStreamDelegate { - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:readClosedForStreamTask:`. - public var streamTaskReadClosed: ((NSURLSession, NSURLSessionStreamTask) -> Void)? { - get { - return _streamTaskReadClosed as? (NSURLSession, NSURLSessionStreamTask) -> Void - } - set { - _streamTaskReadClosed = newValue - } - } - - /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:writeClosedForStreamTask:`. - public var streamTaskWriteClosed: ((NSURLSession, NSURLSessionStreamTask) -> Void)? { - get { - return _streamTaskWriteClosed as? (NSURLSession, NSURLSessionStreamTask) -> Void - } - set { - _streamTaskWriteClosed = newValue - } - } - - /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:betterRouteDiscoveredForStreamTask:`. - public var streamTaskBetterRouteDiscovered: ((NSURLSession, NSURLSessionStreamTask) -> Void)? { - get { - return _streamTaskBetterRouteDiscovered as? (NSURLSession, NSURLSessionStreamTask) -> Void - } - set { - _streamTaskBetterRouteDiscovered = newValue - } - } - - /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:streamTask:didBecomeInputStream:outputStream:`. - public var streamTaskDidBecomeInputStream: ((NSURLSession, NSURLSessionStreamTask, NSInputStream, NSOutputStream) -> Void)? { - get { - return _streamTaskDidBecomeInputStream as? (NSURLSession, NSURLSessionStreamTask, NSInputStream, NSOutputStream) -> Void - } - set { - _streamTaskDidBecomeInputStream = newValue - } - } - - // MARK: Delegate Methods - - /** - Tells the delegate that the read side of the connection has been closed. - - - parameter session: The session. - - parameter streamTask: The stream task. - */ - public func URLSession(session: NSURLSession, readClosedForStreamTask streamTask: NSURLSessionStreamTask) { - streamTaskReadClosed?(session, streamTask) - } - - /** - Tells the delegate that the write side of the connection has been closed. - - - parameter session: The session. - - parameter streamTask: The stream task. - */ - public func URLSession(session: NSURLSession, writeClosedForStreamTask streamTask: NSURLSessionStreamTask) { - streamTaskWriteClosed?(session, streamTask) - } - - /** - Tells the delegate that the system has determined that a better route to the host is available. - - - parameter session: The session. - - parameter streamTask: The stream task. - */ - public func URLSession(session: NSURLSession, betterRouteDiscoveredForStreamTask streamTask: NSURLSessionStreamTask) { - streamTaskBetterRouteDiscovered?(session, streamTask) - } - - /** - Tells the delegate that the stream task has been completed and provides the unopened stream objects. - - - parameter session: The session. - - parameter streamTask: The stream task. - - parameter inputStream: The new input stream. - - parameter outputStream: The new output stream. - */ - public func URLSession( - session: NSURLSession, - streamTask: NSURLSessionStreamTask, - didBecomeInputStream inputStream: NSInputStream, - outputStream: NSOutputStream) - { - streamTaskDidBecomeInputStream?(session, streamTask, inputStream, outputStream) - } -} - -#endif diff --git a/Pods/Alamofire/Source/TaskDelegate.swift b/Pods/Alamofire/Source/TaskDelegate.swift new file mode 100644 index 0000000..32b6118 --- /dev/null +++ b/Pods/Alamofire/Source/TaskDelegate.swift @@ -0,0 +1,448 @@ +// +// TaskDelegate.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// The task delegate is responsible for handling all delegate callbacks for the underlying task as well as +/// executing all operations attached to the serial operation queue upon task completion. +open class TaskDelegate: NSObject { + + // MARK: Properties + + /// The serial operation queue used to execute all operations after the task completes. + open let queue: OperationQueue + + var task: URLSessionTask? { + didSet { reset() } + } + + var data: Data? { return nil } + var error: Error? + + var initialResponseTime: CFAbsoluteTime? + var credential: URLCredential? + var metrics: AnyObject? // URLSessionTaskMetrics + + // MARK: Lifecycle + + init(task: URLSessionTask?) { + self.task = task + + self.queue = { + let operationQueue = OperationQueue() + + operationQueue.maxConcurrentOperationCount = 1 + operationQueue.isSuspended = true + operationQueue.qualityOfService = .utility + + return operationQueue + }() + } + + func reset() { + error = nil + initialResponseTime = nil + } + + // MARK: URLSessionTaskDelegate + + var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)? + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + var taskNeedNewBodyStream: ((URLSession, URLSessionTask) -> InputStream?)? + var taskDidCompleteWithError: ((URLSession, URLSessionTask, Error?) -> Void)? + + @objc(URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:) + func urlSession( + _ session: URLSession, + task: URLSessionTask, + willPerformHTTPRedirection response: HTTPURLResponse, + newRequest request: URLRequest, + completionHandler: @escaping (URLRequest?) -> Void) + { + var redirectRequest: URLRequest? = request + + if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { + redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) + } + + completionHandler(redirectRequest) + } + + @objc(URLSession:task:didReceiveChallenge:completionHandler:) + func urlSession( + _ session: URLSession, + task: URLSessionTask, + didReceive challenge: URLAuthenticationChallenge, + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) + { + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + var credential: URLCredential? + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) + } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { + let host = challenge.protectionSpace.host + + if let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicy(forHost: host), + let serverTrust = challenge.protectionSpace.serverTrust + { + if serverTrustPolicy.evaluate(serverTrust, forHost: host) { + disposition = .useCredential + credential = URLCredential(trust: serverTrust) + } else { + disposition = .cancelAuthenticationChallenge + } + } + } else { + if challenge.previousFailureCount > 0 { + disposition = .rejectProtectionSpace + } else { + credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) + + if credential != nil { + disposition = .useCredential + } + } + } + + completionHandler(disposition, credential) + } + + @objc(URLSession:task:needNewBodyStream:) + func urlSession( + _ session: URLSession, + task: URLSessionTask, + needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) + { + var bodyStream: InputStream? + + if let taskNeedNewBodyStream = taskNeedNewBodyStream { + bodyStream = taskNeedNewBodyStream(session, task) + } + + completionHandler(bodyStream) + } + + @objc(URLSession:task:didCompleteWithError:) + func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { + if let taskDidCompleteWithError = taskDidCompleteWithError { + taskDidCompleteWithError(session, task, error) + } else { + if let error = error { + if self.error == nil { self.error = error } + + if + let downloadDelegate = self as? DownloadTaskDelegate, + let resumeData = (error as NSError).userInfo[NSURLSessionDownloadTaskResumeData] as? Data + { + downloadDelegate.resumeData = resumeData + } + } + + queue.isSuspended = false + } + } +} + +// MARK: - + +class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate { + + // MARK: Properties + + var dataTask: URLSessionDataTask { return task as! URLSessionDataTask } + + override var data: Data? { + if dataStream != nil { + return nil + } else { + return mutableData + } + } + + var progress: Progress + var progressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? + + var dataStream: ((_ data: Data) -> Void)? + + private var totalBytesReceived: Int64 = 0 + private var mutableData: Data + + private var expectedContentLength: Int64? + + // MARK: Lifecycle + + override init(task: URLSessionTask?) { + mutableData = Data() + progress = Progress(totalUnitCount: 0) + + super.init(task: task) + } + + override func reset() { + super.reset() + + progress = Progress(totalUnitCount: 0) + totalBytesReceived = 0 + mutableData = Data() + expectedContentLength = nil + } + + // MARK: URLSessionDataDelegate + + var dataTaskDidReceiveResponse: ((URLSession, URLSessionDataTask, URLResponse) -> URLSession.ResponseDisposition)? + var dataTaskDidBecomeDownloadTask: ((URLSession, URLSessionDataTask, URLSessionDownloadTask) -> Void)? + var dataTaskDidReceiveData: ((URLSession, URLSessionDataTask, Data) -> Void)? + var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)? + + func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + didReceive response: URLResponse, + completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) + { + var disposition: URLSession.ResponseDisposition = .allow + + expectedContentLength = response.expectedContentLength + + if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { + disposition = dataTaskDidReceiveResponse(session, dataTask, response) + } + + completionHandler(disposition) + } + + func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + didBecome downloadTask: URLSessionDownloadTask) + { + dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask) + } + + func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { + if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } + + if let dataTaskDidReceiveData = dataTaskDidReceiveData { + dataTaskDidReceiveData(session, dataTask, data) + } else { + if let dataStream = dataStream { + dataStream(data) + } else { + mutableData.append(data) + } + + let bytesReceived = Int64(data.count) + totalBytesReceived += bytesReceived + let totalBytesExpected = dataTask.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown + + progress.totalUnitCount = totalBytesExpected + progress.completedUnitCount = totalBytesReceived + + if let progressHandler = progressHandler { + progressHandler.queue.async { progressHandler.closure(self.progress) } + } + } + } + + func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + willCacheResponse proposedResponse: CachedURLResponse, + completionHandler: @escaping (CachedURLResponse?) -> Void) + { + var cachedResponse: CachedURLResponse? = proposedResponse + + if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { + cachedResponse = dataTaskWillCacheResponse(session, dataTask, proposedResponse) + } + + completionHandler(cachedResponse) + } +} + +// MARK: - + +class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { + + // MARK: Properties + + var downloadTask: URLSessionDownloadTask { return task as! URLSessionDownloadTask } + + var progress: Progress + var progressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? + + var resumeData: Data? + override var data: Data? { return resumeData } + + var destination: DownloadRequest.DownloadFileDestination? + + var temporaryURL: URL? + var destinationURL: URL? + + var fileURL: URL? { return destination != nil ? destinationURL : temporaryURL } + + // MARK: Lifecycle + + override init(task: URLSessionTask?) { + progress = Progress(totalUnitCount: 0) + super.init(task: task) + } + + override func reset() { + super.reset() + + progress = Progress(totalUnitCount: 0) + resumeData = nil + } + + // MARK: URLSessionDownloadDelegate + + var downloadTaskDidFinishDownloadingToURL: ((URLSession, URLSessionDownloadTask, URL) -> URL)? + var downloadTaskDidWriteData: ((URLSession, URLSessionDownloadTask, Int64, Int64, Int64) -> Void)? + var downloadTaskDidResumeAtOffset: ((URLSession, URLSessionDownloadTask, Int64, Int64) -> Void)? + + func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didFinishDownloadingTo location: URL) + { + temporaryURL = location + + if let destination = destination { + let result = destination(location, downloadTask.response as! HTTPURLResponse) + let destination = result.destinationURL + let options = result.options + + do { + destinationURL = destination + + if options.contains(.removePreviousFile) { + if FileManager.default.fileExists(atPath: destination.path) { + try FileManager.default.removeItem(at: destination) + } + } + + if options.contains(.createIntermediateDirectories) { + let directory = destination.deletingLastPathComponent() + try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true, attributes: nil) + } + + try FileManager.default.moveItem(at: location, to: destination) + } catch { + self.error = error + } + } + } + + func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didWriteData bytesWritten: Int64, + totalBytesWritten: Int64, + totalBytesExpectedToWrite: Int64) + { + if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } + + if let downloadTaskDidWriteData = downloadTaskDidWriteData { + downloadTaskDidWriteData( + session, + downloadTask, + bytesWritten, + totalBytesWritten, + totalBytesExpectedToWrite + ) + } else { + progress.totalUnitCount = totalBytesExpectedToWrite + progress.completedUnitCount = totalBytesWritten + + if let progressHandler = progressHandler { + progressHandler.queue.async { progressHandler.closure(self.progress) } + } + } + } + + func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didResumeAtOffset fileOffset: Int64, + expectedTotalBytes: Int64) + { + if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { + downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) + } else { + progress.totalUnitCount = expectedTotalBytes + progress.completedUnitCount = fileOffset + } + } +} + +// MARK: - + +class UploadTaskDelegate: DataTaskDelegate { + + // MARK: Properties + + var uploadTask: URLSessionUploadTask { return task as! URLSessionUploadTask } + + var uploadProgress: Progress + var uploadProgressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? + + // MARK: Lifecycle + + override init(task: URLSessionTask?) { + uploadProgress = Progress(totalUnitCount: 0) + super.init(task: task) + } + + override func reset() { + super.reset() + uploadProgress = Progress(totalUnitCount: 0) + } + + // MARK: URLSessionTaskDelegate + + var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? + + func URLSession( + _ session: URLSession, + task: URLSessionTask, + didSendBodyData bytesSent: Int64, + totalBytesSent: Int64, + totalBytesExpectedToSend: Int64) + { + if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } + + if let taskDidSendBodyData = taskDidSendBodyData { + taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) + } else { + uploadProgress.totalUnitCount = totalBytesExpectedToSend + uploadProgress.completedUnitCount = totalBytesSent + + if let uploadProgressHandler = uploadProgressHandler { + uploadProgressHandler.queue.async { uploadProgressHandler.closure(self.uploadProgress) } + } + } + } +} diff --git a/Pods/Alamofire/Source/Timeline.swift b/Pods/Alamofire/Source/Timeline.swift index f347705..1440989 100644 --- a/Pods/Alamofire/Source/Timeline.swift +++ b/Pods/Alamofire/Source/Timeline.swift @@ -39,29 +39,27 @@ public struct Timeline { public let serializationCompletedTime: CFAbsoluteTime /// The time interval in seconds from the time the request started to the initial response from the server. - public let latency: NSTimeInterval + public let latency: TimeInterval /// The time interval in seconds from the time the request started to the time the request completed. - public let requestDuration: NSTimeInterval + public let requestDuration: TimeInterval /// The time interval in seconds from the time the request completed to the time response serialization completed. - public let serializationDuration: NSTimeInterval + public let serializationDuration: TimeInterval /// The time interval in seconds from the time the request started to the time response serialization completed. - public let totalDuration: NSTimeInterval - - /** - Creates a new `Timeline` instance with the specified request times. - - - parameter requestStartTime: The time the request was initialized. Defaults to `0.0`. - - parameter initialResponseTime: The time the first bytes were received from or sent to the server. - Defaults to `0.0`. - - parameter requestCompletedTime: The time when the request was completed. Defaults to `0.0`. - - parameter serializationCompletedTime: The time when the response serialization was completed. Defaults - to `0.0`. - - - returns: The new `Timeline` instance. - */ + public let totalDuration: TimeInterval + + /// Creates a new `Timeline` instance with the specified request times. + /// + /// - parameter requestStartTime: The time the request was initialized. Defaults to `0.0`. + /// - parameter initialResponseTime: The time the first bytes were received from or sent to the server. + /// Defaults to `0.0`. + /// - parameter requestCompletedTime: The time when the request was completed. Defaults to `0.0`. + /// - parameter serializationCompletedTime: The time when the response serialization was completed. Defaults + /// to `0.0`. + /// + /// - returns: The new `Timeline` instance. public init( requestStartTime: CFAbsoluteTime = 0.0, initialResponseTime: CFAbsoluteTime = 0.0, @@ -100,7 +98,7 @@ extension Timeline: CustomStringConvertible { "\"Total Duration\": " + totalDuration + " secs" ] - return "Timeline: { " + timings.joinWithSeparator(", ") + " }" + return "Timeline: { " + timings.joined(separator: ", ") + " }" } } @@ -133,6 +131,6 @@ extension Timeline: CustomDebugStringConvertible { "\"Total Duration\": " + totalDuration + " secs" ] - return "Timeline: { " + timings.joinWithSeparator(", ") + " }" + return "Timeline: { " + timings.joined(separator: ", ") + " }" } } diff --git a/Pods/Alamofire/Source/Upload.swift b/Pods/Alamofire/Source/Upload.swift deleted file mode 100644 index 33703f0..0000000 --- a/Pods/Alamofire/Source/Upload.swift +++ /dev/null @@ -1,382 +0,0 @@ -// -// Upload.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Manager { - private enum Uploadable { - case Data(NSURLRequest, NSData) - case File(NSURLRequest, NSURL) - case Stream(NSURLRequest, NSInputStream) - } - - private func upload(uploadable: Uploadable) -> Request { - var uploadTask: NSURLSessionUploadTask! - var HTTPBodyStream: NSInputStream? - - switch uploadable { - case .Data(let request, let data): - dispatch_sync(queue) { - uploadTask = self.session.uploadTaskWithRequest(request, fromData: data) - } - case .File(let request, let fileURL): - dispatch_sync(queue) { - uploadTask = self.session.uploadTaskWithRequest(request, fromFile: fileURL) - } - case .Stream(let request, let stream): - dispatch_sync(queue) { - uploadTask = self.session.uploadTaskWithStreamedRequest(request) - } - - HTTPBodyStream = stream - } - - let request = Request(session: session, task: uploadTask) - - if HTTPBodyStream != nil { - request.delegate.taskNeedNewBodyStream = { _, _ in - return HTTPBodyStream - } - } - - delegate[request.delegate.task] = request.delegate - - if startRequestsImmediately { - request.resume() - } - - return request - } - - // MARK: File - - /** - Creates a request for uploading a file to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request - - parameter file: The file to upload - - - returns: The created upload request. - */ - public func upload(URLRequest: URLRequestConvertible, file: NSURL) -> Request { - return upload(.File(URLRequest.URLRequest, file)) - } - - /** - Creates a request for uploading a file to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter file: The file to upload - - - returns: The created upload request. - */ - public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - file: NSURL) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - return upload(mutableURLRequest, file: file) - } - - // MARK: Data - - /** - Creates a request for uploading data to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request. - - parameter data: The data to upload. - - - returns: The created upload request. - */ - public func upload(URLRequest: URLRequestConvertible, data: NSData) -> Request { - return upload(.Data(URLRequest.URLRequest, data)) - } - - /** - Creates a request for uploading data to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter data: The data to upload - - - returns: The created upload request. - */ - public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - data: NSData) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - - return upload(mutableURLRequest, data: data) - } - - // MARK: Stream - - /** - Creates a request for uploading a stream to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request. - - parameter stream: The stream to upload. - - - returns: The created upload request. - */ - public func upload(URLRequest: URLRequestConvertible, stream: NSInputStream) -> Request { - return upload(.Stream(URLRequest.URLRequest, stream)) - } - - /** - Creates a request for uploading a stream to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter stream: The stream to upload. - - - returns: The created upload request. - */ - public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - stream: NSInputStream) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - - return upload(mutableURLRequest, stream: stream) - } - - // MARK: MultipartFormData - - /// Default memory threshold used when encoding `MultipartFormData`. - public static let MultipartFormDataEncodingMemoryThreshold: UInt64 = 10 * 1024 * 1024 - - /** - Defines whether the `MultipartFormData` encoding was successful and contains result of the encoding as - associated values. - - - Success: Represents a successful `MultipartFormData` encoding and contains the new `Request` along with - streaming information. - - Failure: Used to represent a failure in the `MultipartFormData` encoding and also contains the encoding - error. - */ - public enum MultipartFormDataEncodingResult { - case Success(request: Request, streamingFromDisk: Bool, streamFileURL: NSURL?) - case Failure(ErrorType) - } - - /** - Encodes the `MultipartFormData` and creates a request to upload the result to the specified URL request. - - It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative - payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - used for larger payloads such as video content. - - The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - technique was used. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - `MultipartFormDataEncodingMemoryThreshold` by default. - - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. - */ - public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - multipartFormData: MultipartFormData -> Void, - encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (MultipartFormDataEncodingResult -> Void)?) - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - - return upload( - mutableURLRequest, - multipartFormData: multipartFormData, - encodingMemoryThreshold: encodingMemoryThreshold, - encodingCompletion: encodingCompletion - ) - } - - /** - Encodes the `MultipartFormData` and creates a request to upload the result to the specified URL request. - - It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative - payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - used for larger payloads such as video content. - - The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - technique was used. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request. - - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - `MultipartFormDataEncodingMemoryThreshold` by default. - - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. - */ - public func upload( - URLRequest: URLRequestConvertible, - multipartFormData: MultipartFormData -> Void, - encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (MultipartFormDataEncodingResult -> Void)?) - { - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) { - let formData = MultipartFormData() - multipartFormData(formData) - - let URLRequestWithContentType = URLRequest.URLRequest - URLRequestWithContentType.setValue(formData.contentType, forHTTPHeaderField: "Content-Type") - - let isBackgroundSession = self.session.configuration.identifier != nil - - if formData.contentLength < encodingMemoryThreshold && !isBackgroundSession { - do { - let data = try formData.encode() - let encodingResult = MultipartFormDataEncodingResult.Success( - request: self.upload(URLRequestWithContentType, data: data), - streamingFromDisk: false, - streamFileURL: nil - ) - - dispatch_async(dispatch_get_main_queue()) { - encodingCompletion?(encodingResult) - } - } catch { - dispatch_async(dispatch_get_main_queue()) { - encodingCompletion?(.Failure(error as NSError)) - } - } - } else { - let fileManager = NSFileManager.defaultManager() - let tempDirectoryURL = NSURL(fileURLWithPath: NSTemporaryDirectory()) - let fileName = NSUUID().UUIDString - #if swift(>=2.3) - let directoryURL = tempDirectoryURL.URLByAppendingPathComponent("com.alamofire.manager/multipart.form.data")! - let fileURL = directoryURL.URLByAppendingPathComponent(fileName)! - #else - let directoryURL = tempDirectoryURL.URLByAppendingPathComponent("com.alamofire.manager/multipart.form.data") - let fileURL = directoryURL.URLByAppendingPathComponent(fileName) - #endif - - do { - try fileManager.createDirectoryAtURL(directoryURL, withIntermediateDirectories: true, attributes: nil) - try formData.writeEncodedDataToDisk(fileURL) - - - dispatch_async(dispatch_get_main_queue()) { - let encodingResult = MultipartFormDataEncodingResult.Success( - request: self.upload(URLRequestWithContentType, file: fileURL), - streamingFromDisk: true, - streamFileURL: fileURL - ) - encodingCompletion?(encodingResult) - } - } catch { - dispatch_async(dispatch_get_main_queue()) { - encodingCompletion?(.Failure(error as NSError)) - } - } - } - } - } -} - -// MARK: - - -extension Request { - - // MARK: - UploadTaskDelegate - - class UploadTaskDelegate: DataTaskDelegate { - var uploadTask: NSURLSessionUploadTask? { return task as? NSURLSessionUploadTask } - var uploadProgress: ((Int64, Int64, Int64) -> Void)! - - // MARK: - NSURLSessionTaskDelegate - - // MARK: Override Closures - - var taskDidSendBodyData: ((NSURLSession, NSURLSessionTask, Int64, Int64, Int64) -> Void)? - - // MARK: Delegate Methods - - func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let taskDidSendBodyData = taskDidSendBodyData { - taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } else { - progress.totalUnitCount = totalBytesExpectedToSend - progress.completedUnitCount = totalBytesSent - - uploadProgress?(bytesSent, totalBytesSent, totalBytesExpectedToSend) - } - } - } -} diff --git a/Pods/Alamofire/Source/Validation.swift b/Pods/Alamofire/Source/Validation.swift index b94e07d..dc0eeb5 100644 --- a/Pods/Alamofire/Source/Validation.swift +++ b/Pods/Alamofire/Source/Validation.swift @@ -26,94 +26,33 @@ import Foundation extension Request { - /** - Used to represent whether validation was successful or encountered an error resulting in a failure. + // MARK: Helper Types - - Success: The validation was successful. - - Failure: The validation failed encountering the provided error. - */ - public enum ValidationResult { - case Success - case Failure(NSError) - } - - /** - A closure used to validate a request that takes a URL request and URL response, and returns whether the - request was valid. - */ - public typealias Validation = (NSURLRequest?, NSHTTPURLResponse) -> ValidationResult - - /** - Validates the request, using the specified closure. - - If validation fails, subsequent calls to response handlers will have an associated error. + fileprivate typealias ErrorReason = AFError.ResponseValidationFailureReason - - parameter validation: A closure to validate the request. - - - returns: The request. - */ - public func validate(validation: Validation) -> Self { - delegate.queue.addOperationWithBlock { - if let - response = self.response where self.delegate.error == nil, - case let .Failure(error) = validation(self.request, response) - { - self.delegate.error = error - } - } - - return self - } - - // MARK: - Status Code - - /** - Validates that the response has a status code in the specified range. - - If validation fails, subsequent calls to response handlers will have an associated error. - - - parameter range: The range of acceptable status codes. - - - returns: The request. - */ - public func validate(statusCode acceptableStatusCode: S) -> Self { - return validate { _, response in - if acceptableStatusCode.contains(response.statusCode) { - return .Success - } else { - let failureReason = "Response status code was unacceptable: \(response.statusCode)" - - let error = NSError( - domain: Error.Domain, - code: Error.Code.StatusCodeValidationFailed.rawValue, - userInfo: [ - NSLocalizedFailureReasonErrorKey: failureReason, - Error.UserInfoKeys.StatusCode: response.statusCode - ] - ) - - return .Failure(error) - } - } + /// Used to represent whether validation was successful or encountered an error resulting in a failure. + /// + /// - success: The validation was successful. + /// - failure: The validation failed encountering the provided error. + public enum ValidationResult { + case success + case failure(Error) } - // MARK: - Content-Type - - private struct MIMEType { + fileprivate struct MIMEType { let type: String let subtype: String + var isWildcard: Bool { return type == "*" && subtype == "*" } + init?(_ string: String) { let components: [String] = { - let stripped = string.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()) - let split = stripped.substringToIndex(stripped.rangeOfString(";")?.startIndex ?? stripped.endIndex) - return split.componentsSeparatedByString("/") + let stripped = string.trimmingCharacters(in: .whitespacesAndNewlines) + let split = stripped.substring(to: stripped.range(of: ";")?.lowerBound ?? stripped.endIndex) + return split.components(separatedBy: "/") }() - if let - type = components.first, - subtype = components.last - { + if let type = components.first, let subtype = components.last { self.type = type self.subtype = subtype } else { @@ -121,9 +60,9 @@ extension Request { } } - func matches(MIME: MIMEType) -> Bool { + func matches(_ mime: MIMEType) -> Bool { switch (type, subtype) { - case (MIME.type, MIME.subtype), (MIME.type, "*"), ("*", MIME.subtype), ("*", "*"): + case (mime.type, mime.subtype), (mime.type, "*"), ("*", mime.subtype), ("*", "*"): return true default: return false @@ -131,84 +70,240 @@ extension Request { } } - /** - Validates that the response has a content type in the specified array. + // MARK: Properties - If validation fails, subsequent calls to response handlers will have an associated error. + fileprivate var acceptableStatusCodes: [Int] { return Array(200..<300) } - - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. + fileprivate var acceptableContentTypes: [String] { + if let accept = request?.value(forHTTPHeaderField: "Accept") { + return accept.components(separatedBy: ",") + } - - returns: The request. - */ - public func validate(contentType acceptableContentTypes: S) -> Self { - return validate { _, response in - guard let validData = self.delegate.data where validData.length > 0 else { return .Success } + return ["*/*"] + } - if let - responseContentType = response.MIMEType, - responseMIMEType = MIMEType(responseContentType) - { - for contentType in acceptableContentTypes { - if let acceptableMIMEType = MIMEType(contentType) where acceptableMIMEType.matches(responseMIMEType) { - return .Success - } - } - } else { - for contentType in acceptableContentTypes { - if let MIMEType = MIMEType(contentType) where MIMEType.type == "*" && MIMEType.subtype == "*" { - return .Success - } + // MARK: Status Code + + fileprivate func validate( + statusCode acceptableStatusCodes: S, + response: HTTPURLResponse) + -> ValidationResult + where S.Iterator.Element == Int + { + if acceptableStatusCodes.contains(response.statusCode) { + return .success + } else { + let reason: ErrorReason = .unacceptableStatusCode(code: response.statusCode) + return .failure(AFError.responseValidationFailed(reason: reason)) + } + } + + // MARK: Content Type + + fileprivate func validate( + contentType acceptableContentTypes: S, + response: HTTPURLResponse, + data: Data?) + -> ValidationResult + where S.Iterator.Element == String + { + guard let data = data, data.count > 0 else { return .success } + + guard + let responseContentType = response.mimeType, + let responseMIMEType = MIMEType(responseContentType) + else { + for contentType in acceptableContentTypes { + if let mimeType = MIMEType(contentType), mimeType.isWildcard { + return .success } } - let contentType: String - let failureReason: String + let error: AFError = { + let reason: ErrorReason = .missingContentType(acceptableContentTypes: Array(acceptableContentTypes)) + return AFError.responseValidationFailed(reason: reason) + }() - if let responseContentType = response.MIMEType { - contentType = responseContentType + return .failure(error) + } - failureReason = ( - "Response content type \"\(responseContentType)\" does not match any acceptable " + - "content types: \(acceptableContentTypes)" - ) - } else { - contentType = "" - failureReason = "Response content type was missing and acceptable content type does not match \"*/*\"" + for contentType in acceptableContentTypes { + if let acceptableMIMEType = MIMEType(contentType), acceptableMIMEType.matches(responseMIMEType) { + return .success } + } - let error = NSError( - domain: Error.Domain, - code: Error.Code.ContentTypeValidationFailed.rawValue, - userInfo: [ - NSLocalizedFailureReasonErrorKey: failureReason, - Error.UserInfoKeys.ContentType: contentType - ] + let error: AFError = { + let reason: ErrorReason = .unacceptableContentType( + acceptableContentTypes: Array(acceptableContentTypes), + responseContentType: responseContentType ) - return .Failure(error) - } + return AFError.responseValidationFailed(reason: reason) + }() + + return .failure(error) } +} + +// MARK: - + +extension DataRequest { + /// A closure used to validate a request that takes a URL request, a URL response and data, and returns whether the + /// request was valid. + public typealias Validation = (URLRequest?, HTTPURLResponse, Data?) -> ValidationResult + + /// Validates the request, using the specified closure. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter validation: A closure to validate the request. + /// + /// - returns: The request. + @discardableResult + public func validate(_ validation: @escaping Validation) -> Self { + let validationExecution: () -> Void = { + if + let response = self.response, + self.delegate.error == nil, + case let .failure(error) = validation(self.request, response, self.delegate.data) + { + self.delegate.error = error + } + } - // MARK: - Automatic + validations.append(validationExecution) - /** - Validates that the response has a status code in the default acceptable range of 200...299, and that the content - type matches any specified in the Accept HTTP header field. + return self + } - If validation fails, subsequent calls to response handlers will have an associated error. + /// Validates that the response has a status code in the specified sequence. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter range: The range of acceptable status codes. + /// + /// - returns: The request. + @discardableResult + public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { + return validate { _, response, _ in + return self.validate(statusCode: acceptableStatusCodes, response: response) + } + } - - returns: The request. - */ + /// Validates that the response has a content type in the specified sequence. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. + /// + /// - returns: The request. + @discardableResult + public func validate(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String { + return validate { _, response, data in + return self.validate(contentType: acceptableContentTypes, response: response, data: data) + } + } + + /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content + /// type matches any specified in the Accept HTTP header field. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - returns: The request. + @discardableResult public func validate() -> Self { - let acceptableStatusCodes: Range = 200..<300 - let acceptableContentTypes: [String] = { - if let accept = request?.valueForHTTPHeaderField("Accept") { - return accept.componentsSeparatedByString(",") + return validate(statusCode: self.acceptableStatusCodes).validate(contentType: self.acceptableContentTypes) + } +} + +// MARK: - + +extension DownloadRequest { + /// A closure used to validate a request that takes a URL request, a URL response, a temporary URL and a + /// destination URL, and returns whether the request was valid. + public typealias Validation = ( + _ request: URLRequest?, + _ response: HTTPURLResponse, + _ temporaryURL: URL?, + _ destinationURL: URL?) + -> ValidationResult + + /// Validates the request, using the specified closure. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter validation: A closure to validate the request. + /// + /// - returns: The request. + @discardableResult + public func validate(_ validation: @escaping Validation) -> Self { + let validationExecution: () -> Void = { + let request = self.request + let temporaryURL = self.downloadDelegate.temporaryURL + let destinationURL = self.downloadDelegate.destinationURL + + if + let response = self.response, + self.delegate.error == nil, + case let .failure(error) = validation(request, response, temporaryURL, destinationURL) + { + self.delegate.error = error } + } - return ["*/*"] - }() + validations.append(validationExecution) + + return self + } + + /// Validates that the response has a status code in the specified sequence. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter range: The range of acceptable status codes. + /// + /// - returns: The request. + @discardableResult + public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { + return validate { _, response, _, _ in + return self.validate(statusCode: acceptableStatusCodes, response: response) + } + } - return validate(statusCode: acceptableStatusCodes).validate(contentType: acceptableContentTypes) + /// Validates that the response has a content type in the specified sequence. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. + /// + /// - returns: The request. + @discardableResult + public func validate(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String { + return validate { _, response, _, _ in + let fileURL = self.downloadDelegate.fileURL + + guard let validFileURL = fileURL else { + return .failure(AFError.responseValidationFailed(reason: .dataFileNil)) + } + + do { + let data = try Data(contentsOf: validFileURL) + return self.validate(contentType: acceptableContentTypes, response: response, data: data) + } catch { + return .failure(AFError.responseValidationFailed(reason: .dataFileReadFailed(at: validFileURL))) + } + } + } + + /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content + /// type matches any specified in the Accept HTTP header field. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - returns: The request. + @discardableResult + public func validate() -> Self { + return validate(statusCode: self.acceptableStatusCodes).validate(contentType: self.acceptableContentTypes) } } diff --git a/Pods/Freddy/README.md b/Pods/Freddy/README.md index 707353f..e357e8b 100644 --- a/Pods/Freddy/README.md +++ b/Pods/Freddy/README.md @@ -56,14 +56,14 @@ Here is a quick example on how to parse this data using Freddy: let data = getSomeData() do { let json = try JSON(data: data) - let success = try json.bool("success") + let success = try json.getBool(at: "success") // do something with `success` } catch { // do something with the error } ``` -After we load in the data, we create an instance of `JSON`, the workhorse of this framework. This allows us to access the values from the JSON data. We `try` because the `data` may be malformed and the parsing could generate an error. Next, we access the `"success"` key by calling the `bool(_:)` method on `JSON`. We `try` here as well because accessing the `json` for the key `"success"` could fail - e.g., if we had passed an unknown key. This method takes two parameters, both of which are used to define a path into the `JSON` instance to find a Boolean value of interest. If a `Bool` is found at the path described by `"success"`, then `bool(_:)` returns a `Bool`. If the path does not lead to a `Bool`, then an appropriate error is thrown. +After we load in the data, we create an instance of `JSON`, the workhorse of this framework. This allows us to access the values from the JSON data. We `try` because the `data` may be malformed and the parsing could generate an error. Next, we access the `"success"` key by calling the `getBool(at:)` method on `JSON`. We `try` here as well because accessing the `json` for the key `"success"` could fail - e.g., if we had passed an unknown key. This method takes two parameters, both of which are used to define a path into the `JSON` instance to find a Boolean value of interest. If a `Bool` is found at the path described by `"success"`, then `getBool(at:)` returns a `Bool`. If the path does not lead to a `Bool`, then an appropriate error is thrown. #### Use Paths to Access Nested Data with Subscripting With Freddy, it is possible to use a path to access elements deeper in the json structure. For example: @@ -72,16 +72,16 @@ With Freddy, it is possible to use a path to access elements deeper in the json let data = getSomeData() do { let json = try JSON(data: data) - let georgiaZipCodes = try json.array("states","Georgia") - let firstPersonName = try json.string("people",0,"name") + let georgiaZipCodes = try json.getArray(at: "states","Georgia") + let firstPersonName = try json.getString(at: "people",0,"name") } catch { // do something with the error } ``` -In the code `json.array("states","Georgia")`, the keys `"states"` and `"Georgia"` describe a path to the Georgia zip codes within `json`. +In the code `json.getArray(at: "states","Georgia")`, the keys `"states"` and `"Georgia"` describe a path to the Georgia zip codes within `json`. `Freddy`'s parlance calls this process "subscripting" the JSON. -What is typed between the parentheses of, for example, `array(_:)` is a comma-separated list of keys and indices that describe the path to a value of interest. +What is typed between the parentheses of, for example, `getArray(at:)` is a comma-separated list of keys and indices that describe the path to a value of interest. There can be any number of subscripts, and each subscript can be either a `String` indicating a named element in the JSON, or an `Int` that represents an element in an array. If there is something invalid in the path such as an index that doesn't exist in the JSON, an error will be thrown. @@ -94,14 +94,14 @@ Now, let's look an example that parses the data into a model class: let data = getSomeData() do { let json = try JSON(data: data) - let people = try json.array("people").map(Person.init) + let people = try json.getArray(at: "people").map(Person.init) // do something with `people` } catch { // do something with the error } ``` -Here, we are instead loading the values from the key `"people"` as an array using the method `array(_:)`. This method works a lot like the `bool(_:)` method you saw above. It uses the path provided to the method to find an array. If the path is good, the method will return an `Array` of `JSON`. If the path is bad, then an appropriate error is thrown. +Here, we are instead loading the values from the key `"people"` as an array using the method `getArray(at:)`. This method works a lot like the `getBool(at:)` method you saw above. It uses the path provided to the method to find an array. If the path is good, the method will return an `Array` of `JSON`. If the path is bad, then an appropriate error is thrown. We can then call `map` on that `JSON` array. Since the `Person` type conforms to `JSONDecodable`, we can pass in the `Person` type's initializer. This call applies an initializer that takes an instance of `JSON` to each element in the array, producing an array of `Person` instances. @@ -126,40 +126,44 @@ public struct Person { extension Person: JSONDecodable { public init(json value: JSON) throws { - name = try value.string("name") - age = try value.int("age") - spouse = try value.bool("spouse") + name = try value.getString(at: "name") + age = try value.getInt(at: "age") + spouse = try value.getBool(at: "spouse") } } ``` -`Person` just has a few properties. It conforms to `JSONDecodable` via an extension. In the extension, we implement a `throws`ing initializer that takes an instance of `JSON` as its sole parameter. In the implementation, we `try` three functions: 1) `string(_:)`, 2) `int(_:)`, and 3) `bool(_:)`. Each of these works as you have seen before. The methods take in a path, which is used to find a value of a specific type within the `JSON` instance passed to the initializer. Since these paths could be bad, or the requested type may not match what is actually inside of the `JSON`, these methods may potentially throw an error. +`Person` just has a few properties. It conforms to `JSONDecodable` via an extension. In the extension, we implement a `throws`ing initializer that takes an instance of `JSON` as its sole parameter. In the implementation, we `try` three functions: 1) `getString(at:)`, 2) `getInt(at:)`, and 3) `getBool(at:)`. Each of these works as you have seen before. The methods take in a path, which is used to find a value of a specific type within the `JSON` instance passed to the initializer. Since these paths could be bad, or the requested type may not match what is actually inside of the `JSON`, these methods may potentially throw an error. ### Serialization Freddy's serialization support centers around the `JSON.serialize()` method. #### Basic Usage -The `JSON` enumeration supports conversion to `NSData` directly: +The `JSON` enumeration supports conversion to `Data` directly: ```swift let someJSON: JSON = … -let data: NSData = try someJSON.serialize() +do { + let data: Data = try someJSON.serialize() +} catch { + // Handle error +} ``` #### JSONEncodable: Serializing Other Objects Most of your objects aren't `Freddy.JSON` objects, though. -You can serialize them to `NSData` by first converting them to a +You can serialize them to `Data` by first converting them to a `Freddy.JSON` via `JSONEncodable.toJSON()`, the sole method of the -`JSONEncodable` protocol, and then using `serialize()` to convert -the `Freddy.JSON` to `NSData`: +`JSONEncodable` protocol, and then use `serialize()` to convert +the `Freddy.JSON` to `Data`: ```swift let myObject: JSONEncodable = … -// Object -> JSON -> NSData: +// Object -> JSON -> Data: let objectAsJSON: JSON = myObject.toJSON() -let data: NSData = try objectAsJSON.serialize() +let data: Data = try objectAsJSON.serialize() // More concisely: let dataOneLiner = try object.toJSON().serialize() @@ -172,10 +176,10 @@ and implement that protocol's `toJSON()` method: ```swift extension Person: JSONEncodable { public func toJSON() -> JSON { - return .Dictionary([ - "name": .String(name), - "age": .Int(age), - "spouse": .Bool(spouse)]) + return .dictionary([ + "name": .string(name), + "age": .int(age), + "spouse": .bool(spouse)]) } } ``` @@ -184,9 +188,7 @@ extension Person: JSONEncodable { ## Getting Started -Freddy requires iOS 7.0, Mac OS X 10.9, watchOS 2.0, or tvOS 9.0. Linux is not yet supported. - -Dynamic frameworks on iOS require a minimum deployment target of iOS 8.0. For a project targeting iOS 7, see ["Submodules"](https://github.com/bignerdranch/Freddy#submodules). +Freddy requires iOS 8.0, Mac OS X 10.9, watchOS 2.0, or tvOS 9.0. Linux is not yet supported. You have a few different options to install Freddy. @@ -195,7 +197,7 @@ You have a few different options to install Freddy. Add us to your `Cartfile`: ``` -github "bignerdranch/Freddy" ~> 2.1 +github "bignerdranch/Freddy" ~> 3.0 ``` After running `carthage bootstrap`, add `Freddy.framework` to the "Linked Frameworks and Libraries" panel of your application target. [Read more](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application). @@ -232,16 +234,14 @@ import PackageDescription let package = Package( name: "My Nerdy App", dependencies: [ - .Package(url: "https://github.com/bignerdranch/Freddy.git", majorVersion: 2), + .Package(url: "https://github.com/bignerdranch/Freddy.git", majorVersion: 3), ] ) ``` ### iOS 7 -If you would like to use Freddy with iOS 7, then you will need to copy Freddy's source files into your project. -Embedded frameworks are only supported in iOS 8+. -You can add Freddy as a submodule (see above), and then make sure to add the source files to your project. +If you would like to use Freddy with iOS 7, then you will need to use a previous release of Freddy. ## Setting Breakpoint Errors diff --git a/Pods/Freddy/Sources/JSON.swift b/Pods/Freddy/Sources/JSON.swift index c8adae8..ebe2a92 100644 --- a/Pods/Freddy/Sources/JSON.swift +++ b/Pods/Freddy/Sources/JSON.swift @@ -9,19 +9,19 @@ /// An enum to describe the structure of JSON. public enum JSON { /// A case for denoting an array with an associated value of `[JSON]` - case Array([JSON]) + case array([JSON]) /// A case for denoting a dictionary with an associated value of `[Swift.String: JSON]` - case Dictionary([Swift.String: JSON]) + case dictionary([String: JSON]) /// A case for denoting a double with an associated value of `Swift.Double`. - case Double(Swift.Double) + case double(Double) /// A case for denoting an integer with an associated value of `Swift.Int`. - case Int(Swift.Int) + case int(Int) /// A case for denoting a string with an associated value of `Swift.String`. - case String(Swift.String) + case string(String) /// A case for denoting a boolean with an associated value of `Swift.Bool`. - case Bool(Swift.Bool) + case bool(Bool) /// A case for denoting null. - case Null + case null } // MARK: - Errors @@ -29,18 +29,21 @@ public enum JSON { extension JSON { /// An enum to encapsulate errors that may arise in working with `JSON`. - public enum Error: ErrorType { + public enum Error: Swift.Error { /// The `index` is out of bounds for a JSON array - case IndexOutOfBounds(index: Swift.Int) + case indexOutOfBounds(index: Int) /// The `key` was not found in the JSON dictionary - case KeyNotFound(key: Swift.String) + case keyNotFound(key: String) /// The JSON is not subscriptable with `type` - case UnexpectedSubscript(type: JSONPathType.Type) + case unexpectedSubscript(type: JSONPathType.Type) /// Unexpected JSON `value` was found that is not convertible `to` type - case ValueNotConvertible(value: JSON, to: Any.Type) + case valueNotConvertible(value: JSON, to: Any.Type) + + /// The JSON is not serializable to a `String`. + case stringSerializationError } } @@ -50,23 +53,23 @@ extension JSON { /// Return `true` if `lhs` is equal to `rhs`. public func ==(lhs: JSON, rhs: JSON) -> Bool { switch (lhs, rhs) { - case (.Array(let arrL), .Array(let arrR)): + case (.array(let arrL), .array(let arrR)): return arrL == arrR - case (.Dictionary(let dictL), .Dictionary(let dictR)): + case (.dictionary(let dictL), .dictionary(let dictR)): return dictL == dictR - case (.String(let strL), .String(let strR)): + case (.string(let strL), .string(let strR)): return strL == strR - case (.Double(let dubL), .Double(let dubR)): + case (.double(let dubL), .double(let dubR)): return dubL == dubR - case (.Double(let dubL), .Int(let intR)): + case (.double(let dubL), .int(let intR)): return dubL == Double(intR) - case (.Int(let intL), .Int(let intR)): + case (.int(let intL), .int(let intR)): return intL == intR - case (.Int(let intL), .Double(let dubR)): + case (.int(let intL), .double(let dubR)): return Double(intL) == dubR - case (.Bool(let bL), .Bool(let bR)): + case (.bool(let bL), .bool(let bR)): return bL == bR - case (.Null, .Null): + case (.null, .null): return true default: return false @@ -82,13 +85,13 @@ extension JSON: CustomStringConvertible { /// A textual representation of `self`. public var description: Swift.String { switch self { - case .Array(let arr): return Swift.String(arr) - case .Dictionary(let dict): return Swift.String(dict) - case .String(let string): return string - case .Double(let double): return Swift.String(double) - case .Int(let int): return Swift.String(int) - case .Bool(let bool): return Swift.String(bool) - case .Null: return "null" + case .array(let arr): return String(describing: arr) + case .dictionary(let dict): return String(describing: dict) + case .string(let string): return string + case .double(let double): return String(describing: double) + case .int(let int): return String(describing: int) + case .bool(let bool): return String(describing: bool) + case .null: return "null" } } diff --git a/Pods/Freddy/Sources/JSONDecodable.swift b/Pods/Freddy/Sources/JSONDecodable.swift index ff508c9..7a04703 100644 --- a/Pods/Freddy/Sources/JSONDecodable.swift +++ b/Pods/Freddy/Sources/JSONDecodable.swift @@ -28,12 +28,12 @@ extension Double: JSONDecodable { /// passed to this initializer. public init(json: JSON) throws { switch json { - case let .Double(double): + case let .double(double): self = double - case let .Int(int): - self = Swift.Double(int) + case let .int(int): + self = Double(int) default: - throw JSON.Error.ValueNotConvertible(value: json, to: Swift.Double) + throw JSON.Error.valueNotConvertible(value: json, to: Double.self) } } @@ -48,12 +48,12 @@ extension Int: JSONDecodable { /// passed to this initializer. public init(json: JSON) throws { switch json { - case let .Double(double) where double <= Double(Swift.Int.max): - self = Swift.Int(double) - case let .Int(int): + case let .double(double) where double <= Double(Int.max): + self = Int(double) + case let .int(int): self = int default: - throw JSON.Error.ValueNotConvertible(value: json, to: Swift.Int) + throw JSON.Error.valueNotConvertible(value: json, to: Int.self) } } @@ -67,10 +67,18 @@ extension String: JSONDecodable { /// an instance of `String` cannot be created from the `JSON` value that was /// passed to this initializer. public init(json: JSON) throws { - guard case let .String(string) = json else { - throw JSON.Error.ValueNotConvertible(value: json, to: Swift.String) + switch json { + case let .string(string): + self = string + case let .int(int): + self = String(int) + case let .bool(bool): + self = String(bool) + case let .double(double): + self = String(double) + default: + throw JSON.Error.valueNotConvertible(value: json, to: String.self) } - self = string } } @@ -83,8 +91,8 @@ extension Bool: JSONDecodable { /// an instance of `Bool` cannot be created from the `JSON` value that was /// passed to this initializer. public init(json: JSON) throws { - guard case let .Bool(bool) = json else { - throw JSON.Error.ValueNotConvertible(value: json, to: Swift.Bool) + guard case let .bool(bool) = json else { + throw JSON.Error.valueNotConvertible(value: json, to: Bool.self) } self = bool } @@ -101,7 +109,7 @@ extension RawRepresentable where RawValue: JSONDecodable { public init(json: JSON) throws { let raw = try json.decode(type: RawValue.self) guard let value = Self(rawValue: raw) else { - throw JSON.Error.ValueNotConvertible(value: json, to: Self.self) + throw JSON.Error.valueNotConvertible(value: json, to: Self.self) } self = value } @@ -110,42 +118,60 @@ extension RawRepresentable where RawValue: JSONDecodable { internal extension JSON { /// Retrieves a `[JSON]` from the JSON. + /// - parameter: A `JSON` to be used to create the returned `Array`. /// - returns: An `Array` of `JSON` elements /// - throws: Any of the `JSON.Error` cases thrown by `decode(type:)`. /// - seealso: `JSON.decode(_:type:)` - static func getArray(json: JSON) throws -> [JSON] { + static func getArray(from json: JSON) throws -> [JSON] { // Ideally should be expressed as a conditional protocol implementation on Swift.Array. - guard case let .Array(array) = json else { - throw Error.ValueNotConvertible(value: json, to: Swift.Array) + guard case let .array(array) = json else { + throw Error.valueNotConvertible(value: json, to: Swift.Array) } return array } /// Retrieves a `[String: JSON]` from the JSON. + /// - parameter: A `JSON` to be used to create the returned `Dictionary`. /// - returns: An `Dictionary` of `String` mapping to `JSON` elements /// - throws: Any of the `JSON.Error` cases thrown by `decode(type:)`. /// - seealso: `JSON.decode(_:type:)` - static func getDictionary(json: JSON) throws -> [Swift.String: JSON] { + static func getDictionary(from json: JSON) throws -> [String: JSON] { // Ideally should be expressed as a conditional protocol implementation on Swift.Dictionary. - guard case let .Dictionary(dictionary) = json else { - throw Error.ValueNotConvertible(value: json, to: Swift.Dictionary) + guard case let .dictionary(dictionary) = json else { + throw Error.valueNotConvertible(value: json, to: Swift.Dictionary) } return dictionary } /// Attempts to decode many values from a descendant JSON array at a path /// into JSON. - /// - parameter type: If the context this method is called from does not - /// make the return type clear, pass a type implementing `JSONDecodable` - /// to disambiguate the type to decode with. - /// - returns: An `Array` of decoded elements + /// - parameter json: A `JSON` to be used to create the returned `Array` of some type conforming to `JSONDecodable`. + /// - returns: An `Array` of `Decoded` elements. /// - throws: Any of the `JSON.Error` cases thrown by `decode(type:)`, as /// well as any error that arises from decoding the contained values. /// - seealso: `JSON.decode(_:type:)` - static func getArrayOf(json: JSON) throws -> [Decoded] { + static func decodedArray(from json: JSON) throws -> [Decoded] { // Ideally should be expressed as a conditional protocol implementation on Swift.Dictionary. // This implementation also doesn't do the `type = Type.self` trick. - return try getArray(json).map(Decoded.init) + return try getArray(from: json).map(Decoded.init) + } + + /// Attempts to decode many values from a descendant JSON object at a path + /// into JSON. + /// - parameter json: A `JSON` to be used to create the returned `Dictionary` of some type conforming to `JSONDecodable`. + /// - returns: A `Dictionary` of string keys and `Decoded` values. + /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)` or + /// any error that arises from decoding the contained values. + /// - seealso: `JSON.decode(_:type:)` + static func decodedDictionary(from json: JSON) throws -> [Swift.String: Decoded] { + guard case let .dictionary(dictionary) = json else { + throw Error.valueNotConvertible(value: json, to: Swift.Dictionary) + } + var decodedDictionary = Swift.Dictionary(minimumCapacity: dictionary.count) + for (key, value) in dictionary { + decodedDictionary[key] = try Decoded(json: value) + } + return decodedDictionary } } diff --git a/Pods/Freddy/Sources/JSONEncodable.swift b/Pods/Freddy/Sources/JSONEncodable.swift index 480c57b..7da5fd0 100644 --- a/Pods/Freddy/Sources/JSONEncodable.swift +++ b/Pods/Freddy/Sources/JSONEncodable.swift @@ -13,64 +13,64 @@ public protocol JSONEncodable { /// Converts an instance of a conforming type to `JSON`. /// - returns: An instance of `JSON`. /// - Note: If conforming to `JSONEncodable` with a custom type of your own, you should return an instance of - /// `JSON.Dictionary`. + /// `JSON.dictionary`. func toJSON() -> JSON } extension Array where Element: JSONEncodable { /// Converts an instance of `Array` whose elements conform to `JSONEncodable` to `JSON`. - /// - returns: An instance of `JSON` where the enum case is `.Array`. + /// - returns: An instance of `JSON` where the enum case is `.array`. public func toJSON() -> JSON { let arrayOfJSON = self.map { $0.toJSON() } - return .Array(arrayOfJSON) + return .array(arrayOfJSON) } } extension Dictionary where Value: JSONEncodable { /// Converts an instance of `Dictionary` whose values conform to `JSONEncodable` to `JSON`. The keys in the resulting - /// `JSON.Dictionary` will be of type `String`. - /// - returns: An instance of `JSON` where the enum case is `.Dictionary`. + /// `JSON.dictionary` will be of type `String`. + /// - returns: An instance of `JSON` where the enum case is `.dictionary`. public func toJSON() -> JSON { var jsonDictionary = [String: JSON]() for (k, v) in self { - let key = String(k) + let key = String(describing: k) jsonDictionary[key] = v.toJSON() } - return .Dictionary(jsonDictionary) + return .dictionary(jsonDictionary) } } extension Int: JSONEncodable { /// Converts an instance of a conforming type to `JSON`. - /// - returns: An instance of `JSON` where the enum case is `.Int`. + /// - returns: An instance of `JSON` where the enum case is `.int`. public func toJSON() -> JSON { - return .Int(self) + return .int(self) } } extension Double: JSONEncodable { /// Converts an instance of a conforming type to `JSON`. - /// - returns: An instance of `JSON` where the enum case is `.Double`. + /// - returns: An instance of `JSON` where the enum case is `.double`. public func toJSON() -> JSON { - return .Double(self) + return .double(self) } } extension String: JSONEncodable { /// Converts an instance of a conforming type to `JSON`. - /// - returns: An instance of `JSON` where the enum case is `.String`. + /// - returns: An instance of `JSON` where the enum case is `.string`. public func toJSON() -> JSON { - return .String(self) + return .string(self) } } extension Bool: JSONEncodable { /// Converts an instance of a conforming type to `JSON`. - /// - returns: An instance of `JSON` where the enum case is `.Bool`. + /// - returns: An instance of `JSON` where the enum case is `.bool`. public func toJSON() -> JSON { - return .Bool(self) + return .bool(self) } } diff --git a/Pods/Freddy/Sources/JSONEncodingDetector.swift b/Pods/Freddy/Sources/JSONEncodingDetector.swift index 933bc0c..84410f1 100644 --- a/Pods/Freddy/Sources/JSONEncodingDetector.swift +++ b/Pods/Freddy/Sources/JSONEncodingDetector.swift @@ -12,19 +12,19 @@ public struct JSONEncodingDetector { //// The Unicode encodings looked for during detection public enum Encoding { //// UTF-8 - case UTF8 + case utf8 //// UTF-16 Little Endian - case UTF16LE + case utf16LE //// UTF-16 Big Endian - case UTF16BE + case utf16BE //// UTF-32 Little Endian - case UTF32LE + case utf32LE //// UTF-32 Big Endian - case UTF32BE + case utf32BE } //// The Unicode encodings supported by JSONParser.swift - public static let supportedEncodings: [Encoding] = [.UTF8] + public static let supportedEncodings: [Encoding] = [.utf8] typealias ByteStreamPrefixInformation = (encoding: Encoding, byteOrderMarkLength: Int) @@ -56,10 +56,10 @@ public struct JSONEncodingDetector { //// //// - parameter header: The front Slice of data being read and evaluated. //// - returns: A tuple containing the detected Unicode encoding and the lenght of the byte order mark. - static func detectEncoding(header: Slice>) -> ByteStreamPrefixInformation { + static func detectEncoding(_ header: RandomAccessSlice>) -> ByteStreamPrefixInformation { guard let prefix = prefixFromHeader(header) else { - return (.UTF8, 0) + return (.utf8, 0) } if let prefixInfo = JSONEncodingDetector.encodingFromBOM(prefix) { @@ -67,22 +67,22 @@ public struct JSONEncodingDetector { } else { switch prefix { case(0, 0, 0?, _): - return (.UTF32BE, 0) + return (.utf32BE, 0) case(_, 0, 0?, 0?): - return (.UTF32LE, 0) + return (.utf32LE, 0) case (0, _, 0?, _), (0, _, _, _): - return (.UTF16BE, 0) + return (.utf16BE, 0) case (_, 0, _, 0?), (_, 0, _, _): - return (.UTF16LE, 0) + return (.utf16LE, 0) default: - return (.UTF8, 0) + return (.utf8, 0) } } } private typealias EncodingBytePrefix = (UInt8, UInt8, UInt8?, UInt8?) - private static func prefixFromHeader(header: Slice>) -> EncodingBytePrefix? { + private static func prefixFromHeader(_ header: RandomAccessSlice>) -> EncodingBytePrefix? { if header.count >= 4 { return(header[0], header[1], header[2], header[3]) } else if header.count >= 2 { @@ -91,18 +91,18 @@ public struct JSONEncodingDetector { return nil } - private static func encodingFromBOM(prefix: EncodingBytePrefix) -> ByteStreamPrefixInformation? { + private static func encodingFromBOM(_ prefix: EncodingBytePrefix) -> ByteStreamPrefixInformation? { switch prefix { case(0xFE, 0xFF, _, _): - return (.UTF16BE, 2) + return (.utf16BE, 2) case(0x00, 0x00, 0xFE?, 0xFF?): - return (.UTF32BE, 4) + return (.utf32BE, 4) case(0xEF, 0xBB, 0xBF?, _): - return (.UTF8, 3) + return (.utf8, 3) case(0xFF, 0xFE, 0?, 0?): - return (.UTF32LE, 4) + return (.utf32LE, 4) case(0xFF, 0xFE, _, _): - return (.UTF16LE, 2) + return (.utf16LE, 2) default: return nil } diff --git a/Pods/Freddy/Sources/JSONLiteralConvertible.swift b/Pods/Freddy/Sources/JSONLiteralConvertible.swift index b90e052..8854288 100644 --- a/Pods/Freddy/Sources/JSONLiteralConvertible.swift +++ b/Pods/Freddy/Sources/JSONLiteralConvertible.swift @@ -8,12 +8,12 @@ // MARK: - ArrayLiteralConvertible -extension JSON: ArrayLiteralConvertible { +extension JSON: ExpressibleByArrayLiteral { /// Create an instance by copying each element of the `collection` into a /// new `Array`. - public init(_ collection: Collection) { - self = .Array(Swift.Array(collection)) + public init(_ collection: Collection) where Collection.Iterator.Element == JSON { + self = .array(Swift.Array(collection)) } /// Create an instance initialized with `elements`. @@ -25,32 +25,36 @@ extension JSON: ArrayLiteralConvertible { // MARK: - DictionaryLiteralConvertible -extension JSON: DictionaryLiteralConvertible { - +extension JSON: ExpressibleByDictionaryLiteral { + /// Create an instance by copying each key/value pair of the `pairs` into /// a new `Dictionary`. - public init(_ pairs: Dictionary) { - var dictionary = Swift.Dictionary(minimumCapacity: pairs.underestimateCount()) + public init(_ pairs: Dictionary) where Dictionary.Iterator.Element == (Swift.String, JSON) { + var dictionary = Swift.Dictionary(minimumCapacity: pairs.underestimatedCount) for (key, value) in pairs { dictionary[key] = value } - self = .Dictionary(dictionary) + self.init(dictionary) } - + /// Create an instance initialized with `pairs`. public init(dictionaryLiteral pairs: (Swift.String, JSON)...) { self.init(pairs) } + /// Create an instance initialized to `dictionary`. + public init(_ dictionary: Swift.Dictionary) { + self = .dictionary(dictionary) + } } // MARK: - FloatLiteralConvertible -extension JSON: FloatLiteralConvertible { +extension JSON: ExpressibleByFloatLiteral { /// Create an instance initialized to `Double` `value`. public init(_ value: Swift.Double) { - self = .Double(value) + self = .double(value) } /// Create a literal instance initialized to `value`. @@ -62,11 +66,11 @@ extension JSON: FloatLiteralConvertible { // MARK: - IntegerLiteralConvertible -extension JSON: IntegerLiteralConvertible { +extension JSON: ExpressibleByIntegerLiteral { /// Create an instance initialized to `Int` by `value`. public init(_ value: Swift.Int) { - self = .Int(value) + self = .int(value) } /// Create a literal instance initialized to `value`. @@ -78,11 +82,11 @@ extension JSON: IntegerLiteralConvertible { // MARK: - StringLiteralConvertible -extension JSON: StringLiteralConvertible { +extension JSON: ExpressibleByStringLiteral { /// Create an instance initialized to `String` by `text`. public init(_ text: Swift.String) { - self = .String(text) + self = .string(text) } /// Create a literal instance initialized to `value`. @@ -104,11 +108,11 @@ extension JSON: StringLiteralConvertible { // MARK: - BooleanLiteralConvertible -extension JSON: BooleanLiteralConvertible { +extension JSON: ExpressibleByBooleanLiteral { /// Create an instance initialized to `Bool` by `value`. public init(_ value: Swift.Bool) { - self = .Bool(value) + self = .bool(value) } /// Create a literal instance initialized to `value`. @@ -120,11 +124,11 @@ extension JSON: BooleanLiteralConvertible { // MARK: - NilLiteralConvertible -extension JSON: NilLiteralConvertible { +extension JSON: ExpressibleByNilLiteral { /// Create an instance initialized with `nil`. public init(nilLiteral: ()) { - self = .Null + self = .null } } diff --git a/Pods/Freddy/Sources/JSONParser.swift b/Pods/Freddy/Sources/JSONParser.swift index 00dc9af..31ddaa9 100644 --- a/Pods/Freddy/Sources/JSONParser.swift +++ b/Pods/Freddy/Sources/JSONParser.swift @@ -71,19 +71,17 @@ private let ParserMaximumDepth = 512 /// input and it does not allow trailing commas in arrays or dictionaries. public struct JSONParser { - private enum Sign: Int { - case Positive = 1 - case Negative = -1 + fileprivate enum Sign: Int { + case positive = 1 + case negative = -1 } private let input: UnsafeBufferPointer - private let owner: Any? private var loc = 0 private var depth = 0 - private init(buffer: UnsafeBufferPointer, owner: T) { - self.input = buffer - self.owner = owner + fileprivate init(input: UnsafeBufferPointer) { + self.input = input } /// Decode the root element of the `JSON` stream. This may be any fragment @@ -100,18 +98,18 @@ public struct JSONParser { let value = try parseValue() skipWhitespace() guard loc == input.count else { - throw Error.EndOfStreamGarbage(offset: loc) + throw Error.endOfStreamGarbage(offset: loc) } return value } private mutating func parseValue() throws -> JSON { guard depth <= ParserMaximumDepth else { - throw Error.ExceededNestingLimit(offset: loc) + throw Error.exceededNestingLimit(offset: loc) } guard input.count > 0 else { - throw Error.EndOfStreamUnexpected + throw Error.endOfStreamUnexpected } advancing: while loc < input.count { @@ -140,34 +138,36 @@ public struct JSONParser { return try decodeTrue() case Literal.MINUS: - return try decodeIntegralValue(NumberParser(loc: loc, input: input, state: .LeadingMinus)) + return try decodeIntegralValue(NumberParser(loc: loc, input: input, state: .leadingMinus)) case Literal.zero: - return try decodeIntegralValue(NumberParser(loc: loc, input: input, state: .LeadingZero)) + return try decodeIntegralValue(NumberParser(loc: loc, input: input, state: .leadingZero)) case Literal.one...Literal.nine: - return try decodeIntegralValue(NumberParser(loc: loc, input: input, state: .PreDecimalDigits)) + return try decodeIntegralValue(NumberParser(loc: loc, input: input, state: .preDecimalDigits)) case Literal.SPACE, Literal.TAB, Literal.RETURN, Literal.NEWLINE: - loc = loc.successor() + loc = (loc + 1) default: break advancing } - } catch let InternalError.NumberOverflow(offset: start) { - return try decodeNumberAsString(start) + } catch let InternalError.numberOverflow(offset: start) { + return try decodeNumberAsString(from: start) } } - - throw Error.ValueInvalid(offset: loc, character: UnicodeScalar(input[loc])) + if loc < input.count { + throw Error.valueInvalid(offset: loc, character: UnicodeScalar(input[loc])) + } else { + throw Error.endOfStreamUnexpected + } } private mutating func skipWhitespace() { while loc < input.count { switch input[loc] { case Literal.SPACE, Literal.TAB, Literal.RETURN, Literal.NEWLINE: - loc = loc.successor() - + loc = (loc + 1) default: return } @@ -178,66 +178,65 @@ public struct JSONParser { let header = input.prefix(4) let encodingPrefixInformation = JSONEncodingDetector.detectEncoding(header) guard JSONEncodingDetector.supportedEncodings.contains(encodingPrefixInformation.encoding) else { - throw Error.InvalidUnicodeStreamEncoding(detectedEncoding: encodingPrefixInformation.encoding) + throw Error.invalidUnicodeStreamEncoding(detectedEncoding: encodingPrefixInformation.encoding) } - loc = loc.advancedBy(encodingPrefixInformation.byteOrderMarkLength) + loc = loc.advanced(by: encodingPrefixInformation.byteOrderMarkLength) } private mutating func decodeNull() throws -> JSON { - guard loc.advancedBy(3, limit: input.count) != input.count else { - throw Error.LiteralNilMisspelled(offset: loc) + guard input.index(loc, offsetBy: 3, limitedBy: input.count) != input.count else { + throw Error.literalNilMisspelled(offset: loc) } if input[loc+1] != Literal.u || input[loc+2] != Literal.l || input[loc+3] != Literal.l { - throw Error.LiteralNilMisspelled(offset: loc) + throw Error.literalNilMisspelled(offset: loc) } loc += 4 - return .Null + return .null } private mutating func decodeTrue() throws -> JSON { - guard loc.advancedBy(3, limit: input.count) != input.count else { - throw Error.LiteralTrueMisspelled(offset: loc) + guard input.index(loc, offsetBy: 3, limitedBy: input.count) != input.count else { + throw Error.literalNilMisspelled(offset: loc) } if input[loc+1] != Literal.r || input[loc+2] != Literal.u || input[loc+3] != Literal.e { - throw Error.LiteralTrueMisspelled(offset: loc) + throw Error.literalTrueMisspelled(offset: loc) } loc += 4 - return .Bool(true) + return .bool(true) } private mutating func decodeFalse() throws -> JSON { - guard loc.advancedBy(4, limit: input.count) != input.count else { - throw Error.LiteralFalseMisspelled(offset: loc) + guard input.index(loc, offsetBy: 4, limitedBy: input.count) != input.count else { + throw Error.literalNilMisspelled(offset: loc) } if input[loc+1] != Literal.a || input[loc+2] != Literal.l || input[loc+3] != Literal.s || input[loc+4] != Literal.e { - throw Error.LiteralFalseMisspelled(offset: loc) + throw Error.literalFalseMisspelled(offset: loc) } loc += 5 - return .Bool(false) + return .bool(false) } private var stringDecodingBuffer = [UInt8]() private mutating func decodeString() throws -> JSON { - let start = loc - loc = loc.successor() - stringDecodingBuffer.removeAll(keepCapacity: true) + loc = (loc + 1) + stringDecodingBuffer.removeAll(keepingCapacity: true) while loc < input.count { switch input[loc] { case Literal.BACKSLASH: - loc = loc.successor() + loc = (loc + 1) switch input[loc] { case Literal.DOUBLE_QUOTE: stringDecodingBuffer.append(Literal.DOUBLE_QUOTE) case Literal.BACKSLASH: stringDecodingBuffer.append(Literal.BACKSLASH) @@ -248,7 +247,7 @@ public struct JSONParser { case Literal.t: stringDecodingBuffer.append(Literal.TAB) case Literal.n: stringDecodingBuffer.append(Literal.NEWLINE) case Literal.u: - loc = loc.successor() + loc = (loc + 1) try readUnicodeEscape(start: loc - 2) // readUnicodeEscape() advances loc on its own, so we'll `continue` now @@ -256,29 +255,27 @@ public struct JSONParser { continue default: - throw Error.ControlCharacterUnrecognized(offset: loc) + throw Error.controlCharacterUnrecognized(offset: loc) } - loc = loc.successor() + loc = (loc + 1) case Literal.DOUBLE_QUOTE: - loc = loc.successor() + loc = (loc + 1) stringDecodingBuffer.append(0) - guard let string = (stringDecodingBuffer.withUnsafeBufferPointer { - String.fromCString(UnsafePointer($0.baseAddress)) - }) else { - throw Error.UnicodeEscapeInvalid(offset: start) + let string = stringDecodingBuffer.withUnsafeBufferPointer { + String(cString: UnsafePointer($0.baseAddress!)) } - - return .String(string) + + return .string(string) case let other: stringDecodingBuffer.append(other) - loc = loc.successor() + loc = (loc + 1) } } - throw Error.EndOfStreamUnexpected + throw Error.endOfStreamUnexpected } private mutating func readCodeUnit() -> UInt16? { @@ -308,9 +305,9 @@ public struct JSONParser { return codeUnit } - private mutating func readUnicodeEscape(start start: Int) throws { + private mutating func readUnicodeEscape(start: Int) throws { guard let codeUnit = readCodeUnit() else { - throw Error.UnicodeEscapeInvalid(offset: start) + throw Error.unicodeEscapeInvalid(offset: start) } let codeUnits: [UInt16] @@ -320,51 +317,53 @@ public struct JSONParser { // First confirm and skip over that we have another "\u" guard loc + 6 <= input.count && input[loc] == Literal.BACKSLASH && input[loc+1] == Literal.u else { - throw Error.UnicodeEscapeInvalid(offset: start) + throw Error.unicodeEscapeInvalid(offset: start) } loc += 2 // Ensure the second code unit is valid for the surrogate pair - guard let secondCodeUnit = readCodeUnit() where UTF16.isTrailSurrogate(secondCodeUnit) else { - throw Error.UnicodeEscapeInvalid(offset: start) + guard let secondCodeUnit = readCodeUnit(), UTF16.isTrailSurrogate(secondCodeUnit) else { + throw Error.unicodeEscapeInvalid(offset: start) } codeUnits = [codeUnit, secondCodeUnit] } else { codeUnits = [codeUnit] } - - let transcodeHadError = transcode(UTF16.self, UTF8.self, codeUnits.generate(), { self.stringDecodingBuffer.append($0) }, stopOnError: true) + + let transcodeHadError = transcode(codeUnits.makeIterator(), from: UTF16.self, to: UTF8.self, stoppingOnError: true) { (outputEncodingCodeUnit) in + self.stringDecodingBuffer.append(outputEncodingCodeUnit) + } if transcodeHadError { - throw Error.UnicodeEscapeInvalid(offset: start) + throw Error.unicodeEscapeInvalid(offset: start) } } private mutating func decodeArray() throws -> JSON { let start = loc - loc = loc.successor() + loc = (loc + 1) var items = [JSON]() while loc < input.count { skipWhitespace() if loc < input.count && input[loc] == Literal.RIGHT_BRACKET { - loc = loc.successor() - return .Array(items) + loc = (loc + 1) + return .array(items) } if !items.isEmpty { guard loc < input.count && input[loc] == Literal.COMMA else { - throw Error.CollectionMissingSeparator(offset: start) + throw Error.collectionMissingSeparator(offset: start) } - loc = loc.successor() + loc = (loc + 1) } items.append(try parseValue()) } - throw Error.EndOfStreamUnexpected + throw Error.endOfStreamUnexpected } // Decoding objects can be recursive, so we have to keep more than one @@ -380,13 +379,13 @@ public struct JSONParser { mutating func getBuffer() -> [(String,JSON)] { if !buffers.isEmpty { var buffer = buffers.removeLast() - buffer.removeAll(keepCapacity: true) + buffer.removeAll(keepingCapacity: true) return buffer } return [(String,JSON)]() } - mutating func putBuffer(buffer: [(String,JSON)]) { + mutating func putBuffer(_ buffer: [(String,JSON)]) { buffers.append(buffer) } } @@ -395,210 +394,207 @@ public struct JSONParser { private mutating func decodeObject() throws -> JSON { let start = loc - loc = loc.successor() + loc = (loc + 1) var pairs = decodeObjectBuffers.getBuffer() while loc < input.count { skipWhitespace() if loc < input.count && input[loc] == Literal.RIGHT_BRACE { - loc = loc.successor() + loc = (loc + 1) var obj = [String:JSON](minimumCapacity: pairs.count) for (k, v) in pairs { obj[k] = v } decodeObjectBuffers.putBuffer(pairs) - return .Dictionary(obj) + return .dictionary(obj) } if !pairs.isEmpty { guard loc < input.count && input[loc] == Literal.COMMA else { - throw Error.CollectionMissingSeparator(offset: start) + throw Error.collectionMissingSeparator(offset: start) } - loc = loc.successor() + loc = (loc + 1) skipWhitespace() } guard loc < input.count && input[loc] == Literal.DOUBLE_QUOTE else { - throw Error.DictionaryMissingKey(offset: start) + throw Error.dictionaryMissingKey(offset: start) } - let key = try decodeString().string() + let key = try decodeString().getString() skipWhitespace() guard loc < input.count && input[loc] == Literal.COLON else { - throw Error.CollectionMissingSeparator(offset: start) + throw Error.collectionMissingSeparator(offset: start) } - loc = loc.successor() + loc = (loc + 1) pairs.append((key, try parseValue())) } - throw Error.EndOfStreamUnexpected + throw Error.endOfStreamUnexpected } - private mutating func decodeIntegralValue(parser: NumberParser) throws -> JSON { - var sign = Sign.Positive + private mutating func decodeIntegralValue(_ parser: NumberParser) throws -> JSON { + var sign = Sign.positive var parser = parser var value = 0 // This would be more natural as `while true { ... }` with a meaningful .Done case, // but that causes compile time explosion in Swift 2.2. :-| - while parser.state != .Done { + while parser.state != .done { switch parser.state { - case .LeadingMinus: - sign = .Negative + case .leadingMinus: + sign = .negative try parser.parseNegative() - case .LeadingZero: + case .leadingZero: parser.parseLeadingZero() - case .PreDecimalDigits: + case .preDecimalDigits: try parser.parsePreDecimalDigits { c in guard case let (exponent, false) = Int.multiplyWithOverflow(10, value) else { - throw InternalError.NumberOverflow(offset: parser.start) + throw InternalError.numberOverflow(offset: parser.start) } guard case let (newValue, false) = Int.addWithOverflow(exponent, Int(c - Literal.zero)) else { - throw InternalError.NumberOverflow(offset: parser.start) + throw InternalError.numberOverflow(offset: parser.start) } value = newValue } - case .Decimal, .Exponent: - return try detectingFloatingPointErrors(parser.start) { + case .decimal, .exponent: + return try detectingFloatingPointErrors(start: parser.start) { try decodeFloatingPointValue(parser, sign: sign, value: Double(value)) } - case .PostDecimalDigits, .ExponentSign, .ExponentDigits: + case .postDecimalDigits, .exponentSign, .exponentDigits: assertionFailure("Invalid internal state while parsing number") - case .Done: + case .done: fatalError("impossible condition") } } guard case let (signedValue, false) = Int.multiplyWithOverflow(sign.rawValue, value) else { - throw InternalError.NumberOverflow(offset: parser.start) + throw InternalError.numberOverflow(offset: parser.start) } loc = parser.loc - return .Int(signedValue) + return .int(signedValue) } - private mutating func decodeFloatingPointValue(parser: NumberParser, sign: Sign, value: Double) throws -> JSON { + private mutating func decodeFloatingPointValue(_ parser: NumberParser, sign: Sign, value: Double) throws -> JSON { var parser = parser var value = value - var exponentSign = Sign.Positive + var exponentSign = Sign.positive var exponent = Double(0) var position = 0.1 // This would be more natural as `while true { ... }` with a meaningful .Done case, // but that causes compile time explosion in Swift 2.2. :-| - while parser.state != .Done { + while parser.state != .done { switch parser.state { - case .LeadingMinus, .LeadingZero, .PreDecimalDigits: + case .leadingMinus, .leadingZero, .preDecimalDigits: assertionFailure("Invalid internal state while parsing number") - case .Decimal: + case .decimal: try parser.parseDecimal() - case .PostDecimalDigits: + case .postDecimalDigits: parser.parsePostDecimalDigits { c in value += position * Double(c - Literal.zero) position /= 10 } - case .Exponent: + case .exponent: exponentSign = try parser.parseExponent() - case .ExponentSign: + case .exponentSign: try parser.parseExponentSign() - case .ExponentDigits: + case .exponentDigits: parser.parseExponentDigits { c in exponent = exponent * 10 + Double(c - Literal.zero) } - case .Done: + case .done: fatalError("impossible condition") } } loc = parser.loc - return .Double(Double(sign.rawValue) * value * pow(10, Double(exponentSign.rawValue) * exponent)) + return .double(Double(sign.rawValue) * value * pow(10, Double(exponentSign.rawValue) * exponent)) } - private mutating func decodeNumberAsString(start: Int) throws -> JSON { + + private mutating func decodeNumberAsString(from position: Int) throws -> JSON { var parser: NumberParser = { let state: NumberParser.State - switch input[start] { - case Literal.MINUS: state = .LeadingMinus - case Literal.zero: state = .LeadingZero - case Literal.one...Literal.nine: state = .PreDecimalDigits + switch input[position] { + case Literal.MINUS: state = .leadingMinus + case Literal.zero: state = .leadingZero + case Literal.one...Literal.nine: state = .preDecimalDigits default: fatalError("Internal error: decodeNumber called on not-a-number") } - return NumberParser(loc: start, input: input, state: state) + return NumberParser(loc: position, input: input, state: state) }() - stringDecodingBuffer.removeAll(keepCapacity: true) + stringDecodingBuffer.removeAll(keepingCapacity: true) while true { switch parser.state { - case .LeadingMinus: + case .leadingMinus: try parser.parseNegative() stringDecodingBuffer.append(Literal.MINUS) - case .LeadingZero: + case .leadingZero: parser.parseLeadingZero() stringDecodingBuffer.append(Literal.zero) - case .PreDecimalDigits: + case .preDecimalDigits: parser.parsePreDecimalDigits { stringDecodingBuffer.append($0) } - case .Decimal: + case .decimal: try parser.parseDecimal() stringDecodingBuffer.append(Literal.PERIOD) - case .PostDecimalDigits: + case .postDecimalDigits: parser.parsePostDecimalDigits { stringDecodingBuffer.append($0) } - case .Exponent: + case .exponent: stringDecodingBuffer.append(input[parser.loc]) _ = try parser.parseExponent() - case .ExponentSign: + case .exponentSign: stringDecodingBuffer.append(input[parser.loc]) try parser.parseExponentSign() - case .ExponentDigits: + case .exponentDigits: parser.parseExponentDigits { stringDecodingBuffer.append($0) } - case .Done: + case .done: stringDecodingBuffer.append(0) - guard let string = (stringDecodingBuffer.withUnsafeBufferPointer { - String.fromCString(UnsafePointer($0.baseAddress)) - }) else { - // Should never fail - any problems with the number string should - // result in thrown errors above - fatalError("Internal error: Invalid numeric string") + let string = stringDecodingBuffer.withUnsafeBufferPointer { + String(cString: UnsafePointer($0.baseAddress!)) } loc = parser.loc - return .String(string) + return .string(string) } } } - private func detectingFloatingPointErrors(loc: Int, @noescape _ f: () throws -> T) throws -> T { + private func detectingFloatingPointErrors(start loc: Int, _ f: () throws -> T) throws -> T { let flags = FE_UNDERFLOW | FE_OVERFLOW feclearexcept(flags) let value = try f() guard fetestexcept(flags) == 0 else { - throw InternalError.NumberOverflow(offset: loc) + throw InternalError.numberOverflow(offset: loc) } return value } @@ -606,15 +602,15 @@ public struct JSONParser { private struct NumberParser { enum State { - case LeadingMinus - case LeadingZero - case PreDecimalDigits - case Decimal - case PostDecimalDigits - case Exponent - case ExponentSign - case ExponentDigits - case Done + case leadingMinus + case leadingZero + case preDecimalDigits + case decimal + case postDecimalDigits + case exponent + case exponentSign + case exponentDigits + case done } let start: Int @@ -631,57 +627,61 @@ private struct NumberParser { } mutating func parseNegative() throws { - assert(state == .LeadingMinus, "Unexpected state entering parseNegative") + assert(state == .leadingMinus, "Unexpected state entering parseNegative") - loc = loc.successor() + loc = (loc + 1) guard loc < input.count else { - throw JSONParser.Error.EndOfStreamUnexpected + throw JSONParser.Error.endOfStreamUnexpected } switch input[loc] { case Literal.zero: - state = .LeadingZero + state = .leadingZero case Literal.one...Literal.nine: - state = .PreDecimalDigits + state = .preDecimalDigits default: - throw JSONParser.Error.NumberSymbolMissingDigits(offset: start) + throw JSONParser.Error.numberSymbolMissingDigits(offset: start) } } mutating func parseLeadingZero() { - assert(state == .LeadingZero, "Unexpected state entering parseLeadingZero") + assert(state == .leadingZero, "Unexpected state entering parseLeadingZero") - loc = loc.successor() + loc = (loc + 1) guard loc < input.count else { - state = .Done + state = .done return } - guard input[loc] == Literal.PERIOD else { - state = .Done - return - } + switch input[loc] { + case Literal.PERIOD: + state = .decimal + + case Literal.e, Literal.E: + state = .exponent - state = .Decimal + default: + state = .done + } } - mutating func parsePreDecimalDigits(@noescape f: (UInt8) throws -> Void) rethrows { - assert(state == .PreDecimalDigits, "Unexpected state entering parsePreDecimalDigits") + mutating func parsePreDecimalDigits(f: (UInt8) throws -> Void) rethrows { + assert(state == .preDecimalDigits, "Unexpected state entering parsePreDecimalDigits") advancing: while loc < input.count { let c = input[loc] switch c { case Literal.zero...Literal.nine: try f(c) - loc = loc.successor() + loc = (loc + 1) case Literal.PERIOD: - state = .Decimal + state = .decimal return case Literal.e, Literal.E: - state = .Exponent + state = .exponent return default: @@ -689,37 +689,37 @@ private struct NumberParser { } } - state = .Done + state = .done } mutating func parseDecimal() throws { - assert(state == .Decimal, "Unexpected state entering parseDecimal") - loc = loc.successor() + assert(state == .decimal, "Unexpected state entering parseDecimal") + loc = (loc + 1) guard loc < input.count else { - throw JSONParser.Error.EndOfStreamUnexpected + throw JSONParser.Error.endOfStreamUnexpected } switch input[loc] { case Literal.zero...Literal.nine: - state = .PostDecimalDigits + state = .postDecimalDigits default: - throw JSONParser.Error.NumberMissingFractionalDigits(offset: start) + throw JSONParser.Error.numberMissingFractionalDigits(offset: start) } } - mutating func parsePostDecimalDigits(@noescape f: (UInt8) throws -> Void) rethrows { - assert(state == .PostDecimalDigits, "Unexpected state entering parsePostDecimalDigits") + mutating func parsePostDecimalDigits(f: (UInt8) throws -> Void) rethrows { + assert(state == .postDecimalDigits, "Unexpected state entering parsePostDecimalDigits") advancing: while loc < input.count { let c = input[loc] switch c { case Literal.zero...Literal.nine: try f(c) - loc = loc.successor() + loc = (loc + 1) case Literal.e, Literal.E: - state = .Exponent + state = .exponent return default: @@ -727,104 +727,119 @@ private struct NumberParser { } } - state = .Done + state = .done } mutating func parseExponent() throws -> JSONParser.Sign { - assert(state == .Exponent, "Unexpected state entering parseExponent") + assert(state == .exponent, "Unexpected state entering parseExponent") - loc = loc.successor() + loc = (loc + 1) guard loc < input.count else { - throw JSONParser.Error.EndOfStreamUnexpected + throw JSONParser.Error.endOfStreamUnexpected } switch input[loc] { case Literal.zero...Literal.nine: - state = .ExponentDigits + state = .exponentDigits case Literal.PLUS: - state = .ExponentSign + state = .exponentSign case Literal.MINUS: - state = .ExponentSign - return .Negative + state = .exponentSign + return .negative default: - throw JSONParser.Error.NumberSymbolMissingDigits(offset: start) + throw JSONParser.Error.numberSymbolMissingDigits(offset: start) } - return .Positive + return .positive } mutating func parseExponentSign() throws { - assert(state == .ExponentSign, "Unexpected state entering parseExponentSign") - loc = loc.successor() + assert(state == .exponentSign, "Unexpected state entering parseExponentSign") + loc = (loc + 1) guard loc < input.count else { - throw JSONParser.Error.EndOfStreamUnexpected + throw JSONParser.Error.endOfStreamUnexpected } switch input[loc] { case Literal.zero...Literal.nine: - state = .ExponentDigits + state = .exponentDigits default: - throw JSONParser.Error.NumberSymbolMissingDigits(offset: start) + throw JSONParser.Error.numberSymbolMissingDigits(offset: start) } } - mutating func parseExponentDigits(@noescape f: (UInt8) throws -> Void) rethrows { - assert(state == .ExponentDigits, "Unexpected state entering parseExponentDigits") + mutating func parseExponentDigits(f: (UInt8) throws -> Void) rethrows { + assert(state == .exponentDigits, "Unexpected state entering parseExponentDigits") advancing: while loc < input.count { let c = input[loc] switch c { case Literal.zero...Literal.nine: try f(c) - loc = loc.successor() + loc = (loc + 1) default: break advancing } } - state = .Done + state = .done } } public extension JSONParser { - /// Creates a `JSONParser` ready to parse UTF-8 encoded `NSData`. + /// Creates a `JSONParser` ready to parse UTF-8 encoded `Data`. /// /// If the data is mutable, it is copied before parsing. The data's lifetime /// is extended for the duration of parsing. - init(utf8Data inData: NSData) { - let data = inData.copy() as! NSData - let buffer = UnsafeBufferPointer(start: UnsafePointer(data.bytes), count: data.length) - self.init(buffer: buffer, owner: data) + @available(*, unavailable, message: "Replaced with parse(utf8:)") + init(utf8Data inData: Data) { + fatalError("unavailable code cannot be executed") } /// Creates a `JSONParser` from the code units represented by the `string`. /// /// The synthesized string is lifetime-extended for the duration of parsing. + @available(*, unavailable, message: "Replaced with parse(utf8:)") init(string: String) { - let codePoints = string.nulTerminatedUTF8 - let buffer = codePoints.withUnsafeBufferPointer { nulTerminatedBuffer in - // don't want to include the nul termination in the buffer - trim it off - UnsafeBufferPointer(start: nulTerminatedBuffer.baseAddress, count: nulTerminatedBuffer.count - 1) + fatalError("unavailable code cannot be executed") + } + + /// Creates an instance of `JSON` from UTF-8 encoded `data`. + static func parse(utf8 data: Data) throws -> JSON { + return try data.withUnsafeBytes { (ptr: UnsafePointer) -> JSON in + let buffer = UnsafeBufferPointer(start: ptr, count: data.count) + var parser = JSONParser(input: buffer) + return try parser.parse() + } + } + + /// Creates an instance of `JSON` from `string`. + static func parse(_ string: String) throws -> JSON { + return try string.utf8CString.withUnsafeBufferPointer { (nulTerminatedBuffer) throws -> JSON in + return try nulTerminatedBuffer.baseAddress!.withMemoryRebound(to: UInt8.self, capacity: nulTerminatedBuffer.count) { (utf8Base) throws -> JSON in + // don't want to include the nul termination in the buffer - trim it off + let buffer = UnsafeBufferPointer(start: utf8Base, count: nulTerminatedBuffer.count - 1) + var parser = JSONParser(input: buffer) + return try parser.parse() + } } - self.init(buffer: buffer, owner: codePoints) } } extension JSONParser: JSONParserType { - /// Creates an instance of `JSON` from UTF-8 encoded `NSData`. - /// - parameter data: An instance of `NSData` to parse `JSON` from. + /// Creates an instance of `JSON` from UTF-8 encoded `Data`. + /// - parameter data: An instance of `Data` to parse `JSON` from. /// - throws: Any `JSONParser.Error` that arises during decoding. /// - seealso: JSONParser.parse() - public static func createJSONFromData(data: NSData) throws -> JSON { - var parser = JSONParser(utf8Data: data) - return try parser.parse() + public static func createJSON(from data: Data) throws -> JSON { + return try parse(utf8: data) } } @@ -837,67 +852,67 @@ extension JSONParser { /// document. Most errors include an associated `offset`, representing the /// offset into the UTF-8 characters making up the document where the error /// occurred. - public enum Error: ErrorType { + public enum Error: Swift.Error { /// The parser ran out of data prematurely. This usually means a value /// was not escaped, such as a string literal not ending with a double /// quote. - case EndOfStreamUnexpected + case endOfStreamUnexpected /// Unexpected non-whitespace data was left around `offset` after /// parsing all valid JSON. - case EndOfStreamGarbage(offset: Int) + case endOfStreamGarbage(offset: Int) /// Too many nested objects or arrays occured at the literal started /// around `offset`. - case ExceededNestingLimit(offset: Int) + case exceededNestingLimit(offset: Int) /// A `character` was not a valid start of a value around `offset`. - case ValueInvalid(offset: Int, character: UnicodeScalar) + case valueInvalid(offset: Int, character: UnicodeScalar) /// Badly-formed Unicode escape sequence at `offset`. A Unicode escape /// uses the text "\u" followed by 4 hex digits, such as "\uF09F\uA684" /// to represent U+1F984, "UNICORN FACE". - case UnicodeEscapeInvalid(offset: Int) + case unicodeEscapeInvalid(offset: Int) /// Badly-formed control character around `offset`. JSON supports /// backslash-escaped double quotes, slashes, whitespace control codes, /// and Unicode escape sequences. - case ControlCharacterUnrecognized(offset: Int) + case controlCharacterUnrecognized(offset: Int) /// Invalid token, expected `null` around `offset` - case LiteralNilMisspelled(offset: Int) + case literalNilMisspelled(offset: Int) /// Invalid token, expected `true` around `offset` - case LiteralTrueMisspelled(offset: Int) + case literalTrueMisspelled(offset: Int) /// Invalid token, expected `false` around `offset` - case LiteralFalseMisspelled(offset: Int) + case literalFalseMisspelled(offset: Int) /// Badly-formed collection at given `offset`, expected `,` or `:` - case CollectionMissingSeparator(offset: Int) + case collectionMissingSeparator(offset: Int) /// While parsing an object literal, a value was found without a key /// around `offset`. The start of a string literal was expected. - case DictionaryMissingKey(offset: Int) + case dictionaryMissingKey(offset: Int) /// Badly-formed number with no digits around `offset`. After a decimal /// point, a number must include some number of digits. - case NumberMissingFractionalDigits(offset: Int) + case numberMissingFractionalDigits(offset: Int) /// Badly-formed number with symbols ("-" or "e") but no following /// digits around `offset`. - case NumberSymbolMissingDigits(offset: Int) + case numberSymbolMissingDigits(offset: Int) /// Supplied data is encoded in an unsupported format. - case InvalidUnicodeStreamEncoding(detectedEncoding: JSONEncodingDetector.Encoding) + case invalidUnicodeStreamEncoding(detectedEncoding: JSONEncodingDetector.Encoding) } - private enum InternalError: ErrorType { + fileprivate enum InternalError: Swift.Error { /// Attempted to parse an integer outside the range of [Int.min, Int.max] /// or a double outside the range of representable doubles. Note that /// for doubles, this could be an overflow or an underflow - we don't /// get enough information from Swift here to know which it is. The number /// causing the overflow/underflow began at `offset`. - case NumberOverflow(offset: Int) + case numberOverflow(offset: Int) } } diff --git a/Pods/Freddy/Sources/JSONParsing.swift b/Pods/Freddy/Sources/JSONParsing.swift index 90cb6be..0be146c 100644 --- a/Pods/Freddy/Sources/JSONParsing.swift +++ b/Pods/Freddy/Sources/JSONParsing.swift @@ -10,14 +10,14 @@ import Foundation // MARK: - Deserialize JSON -/// Protocol describing a backend parser that can produce `JSON` from `NSData`. +/// Protocol describing a backend parser that can produce `JSON` from `Data`. public protocol JSONParserType { - /// Creates an instance of `JSON` from `NSData`. - /// - parameter data: An instance of `NSData` to use to create `JSON`. + /// Creates an instance of `JSON` from `Data`. + /// - parameter data: An instance of `Data` to use to create `JSON`. /// - throws: An error that may arise from calling `JSONObjectWithData(_:options:)` on `NSJSONSerialization` with the given data. /// - returns: An instance of `JSON`. - static func createJSONFromData(data: NSData) throws -> JSON + static func createJSON(from data: Data) throws -> JSON } @@ -25,47 +25,47 @@ extension JSON { /// Create `JSON` from UTF-8 `data`. By default, parses using the /// Swift-native `JSONParser` backend. - public init(data: NSData, usingParser parser: JSONParserType.Type = JSONParser.self) throws { - self = try parser.createJSONFromData(data) + public init(data: Data, usingParser parser: JSONParserType.Type = JSONParser.self) throws { + self = try parser.createJSON(from: data) } /// Create `JSON` from UTF-8 `string`. public init(jsonString: Swift.String, usingParser parser: JSONParserType.Type = JSONParser.self) throws { - self = try parser.createJSONFromData((jsonString as NSString).dataUsingEncoding(NSUTF8StringEncoding) ?? NSData()) + self = try parser.createJSON(from: jsonString.data(using: Swift.String.Encoding.utf8) ?? Data()) } } // MARK: - NSJSONSerialization -extension NSJSONSerialization: JSONParserType { +extension JSONSerialization: JSONParserType { - // MARK: Decode NSData + // MARK: Decode Data /// Use the built-in, Objective-C based JSON parser to create `JSON`. - /// - parameter data: An instance of `NSData`. + /// - parameter data: An instance of `Data`. /// - returns: An instance of `JSON`. - /// - throws: An error that may arise if the `NSData` cannot be parsed into an object. - public static func createJSONFromData(data: NSData) throws -> JSON { - return makeJSON(try NSJSONSerialization.JSONObjectWithData(data, options: [])) + /// - throws: An error that may arise if the `Data` cannot be parsed into an object. + public static func createJSON(from data: Data) throws -> JSON { + return makeJSON(with: try JSONSerialization.jsonObject(with: data, options: [])) } // MARK: Make JSON /// Makes a `JSON` object by matching its argument to a case in the `JSON` enum. - /// - parameter object: The instance of `AnyObject` returned from serializing the JSON. + /// - parameter object: The instance of `Any` returned from serializing the JSON. /// - returns: An instance of `JSON` matching the JSON given to the function. - private static func makeJSON(object: AnyObject) -> JSON { + private static func makeJSON(with object: Any) -> JSON { switch object { case let n as NSNumber: let numberType = CFNumberGetType(n) switch numberType { - case .CharType: - return .Bool(n.boolValue) + case .charType: + return .bool(n.boolValue) - case .ShortType, .IntType, .LongType, .CFIndexType, .NSIntegerType, .SInt8Type, .SInt16Type, .SInt32Type: - return .Int(n.integerValue) + case .shortType, .intType, .longType, .cfIndexType, .nsIntegerType, .sInt8Type, .sInt16Type, .sInt32Type: + return .int(n.intValue) - case .SInt64Type, .LongLongType /* overflows 32-bit Int */: + case .sInt64Type, .longLongType /* overflows 32-bit Int */: #if /* 32-bit arch */ arch(arm) || arch(i386) // Why double, when the Freddy parser would bump to String? // @@ -80,26 +80,26 @@ extension NSJSONSerialization: JSONParserType { // you'll have to switch from .double to .string for pulling out // overflowing values, but if you stick with a single parser, // you at least won't have architecture-dependent lookups! - return .Double(n.doubleValue) + return .double(n.doubleValue) #else - return .Int(n.integerValue) + return .int(n.intValue) #endif - case .Float32Type, .Float64Type, .FloatType, .DoubleType, .CGFloatType: - return .Double(n.doubleValue) + case .float32Type, .float64Type, .floatType, .doubleType, .cgFloatType: + return .double(n.doubleValue) } - case let arr as [AnyObject]: + case let arr as [Any]: return makeJSONArray(arr) - case let dict as [Swift.String: AnyObject]: + case let dict as [Swift.String: Any]: return makeJSONDictionary(dict) case let s as Swift.String: - return .String(s) + return .string(s) default: - return .Null + return .null } } @@ -108,8 +108,8 @@ extension NSJSONSerialization: JSONParserType { /// Makes a `JSON` array from the object passed in. /// - parameter jsonArray: The array to transform into a `JSON`. /// - returns: An instance of `JSON` matching the array. - private static func makeJSONArray(jsonArray: [AnyObject]) -> JSON { - return .Array(jsonArray.map(makeJSON)) + private static func makeJSONArray(_ jsonArray: [Any]) -> JSON { + return .array(jsonArray.map(makeJSON)) } // MARK: Make a JSON Dictionary @@ -117,9 +117,9 @@ extension NSJSONSerialization: JSONParserType { /// Makes a `JSON` dictionary from the Cocoa dictionary passed in. /// - parameter jsonDict: The dictionary to transform into `JSON`. /// - returns: An instance of `JSON` matching the dictionary. - private static func makeJSONDictionary(jsonDict: [Swift.String: AnyObject]) -> JSON { + private static func makeJSONDictionary(_ jsonDict: [Swift.String: Any]) -> JSON { return JSON(jsonDict.lazy.map { (key, value) in - (key, makeJSON(value)) + (key, makeJSON(with: value)) }) } diff --git a/Pods/Freddy/Sources/JSONSerializing.swift b/Pods/Freddy/Sources/JSONSerializing.swift index 343a5a3..85a6f71 100644 --- a/Pods/Freddy/Sources/JSONSerializing.swift +++ b/Pods/Freddy/Sources/JSONSerializing.swift @@ -6,36 +6,47 @@ import Foundation extension JSON { - /// Attempt to serialize `JSON` into an `NSData`. + /// Attempt to serialize `JSON` into an `Data`. /// - returns: A byte-stream containing the `JSON` ready for wire transfer. - /// - throws: Errors that arise from `NSJSONSerialization`. - /// - see: Foundation.NSJSONSerialization - public func serialize() throws -> NSData { - let obj: AnyObject = toNSJSONSerializationObject() - return try NSJSONSerialization.dataWithJSONObject(obj, options: []) + /// - throws: Errors that arise from `JSONSerialization`. + /// - see: Foundation.JSONSerialization + public func serialize() throws -> Data { + return try JSONSerialization.data(withJSONObject: toJSONSerializationValue(), options: []) + } + + /// Attempt to serialize `JSON` into a `String`. + /// - returns: A `String` containing the `JSON`. + /// - throws: A `JSON.Error.StringSerializationError` or errors that arise from `JSONSerialization`. + /// - see: Foundation.JSONSerialization + public func serializeString() throws -> String { + let data = try self.serialize() + guard let json = String(data: data, encoding: String.Encoding.utf8) else { + throw Error.stringSerializationError + } + return json } /// A function to help with the serialization of `JSON`. - /// - returns: An `AnyObject` suitable for `NSJSONSerialization`'s use. - private func toNSJSONSerializationObject() -> AnyObject { + /// - returns: An `Any` suitable for `JSONSerialization`'s use. + private func toJSONSerializationValue() -> Any { switch self { - case .Array(let jsonArray): - return jsonArray.map { $0.toNSJSONSerializationObject() } - case .Dictionary(let jsonDictionary): - var cocoaDictionary = Swift.Dictionary(minimumCapacity: jsonDictionary.count) + case .array(let jsonArray): + return jsonArray.map { $0.toJSONSerializationValue() } + case .dictionary(let jsonDictionary): + var cocoaDictionary = Swift.Dictionary(minimumCapacity: jsonDictionary.count) for (key, json) in jsonDictionary { - cocoaDictionary[key] = json.toNSJSONSerializationObject() + cocoaDictionary[key] = json.toJSONSerializationValue() } return cocoaDictionary - case .String(let str): + case .string(let str): return str - case .Double(let num): - return num - case .Int(let int): - return int - case .Bool(let b): - return b - case .Null: + case .double(let num): + return NSNumber(value: num) + case .int(let int): + return NSNumber(value: int) + case .bool(let b): + return NSNumber(value: b) + case .null: return NSNull() } diff --git a/Pods/Freddy/Sources/JSONSubscripting.swift b/Pods/Freddy/Sources/JSONSubscripting.swift index 785f8ce..6d1bd3e 100644 --- a/Pods/Freddy/Sources/JSONSubscripting.swift +++ b/Pods/Freddy/Sources/JSONSubscripting.swift @@ -19,29 +19,29 @@ public protocol JSONPathType { /// an error rather than convert to `nil`. /// /// Upon failure, implementers should throw an error from `JSON.Error`. - func valueInDictionary(dictionary: [Swift.String : JSON]) throws -> JSON + func value(in dictionary: [String : JSON]) throws -> JSON /// Use `self` to index into an `array`. /// - /// Unlike Swift array, attempting to index outside the collection's bounds + /// Unlike Swift arrays, attempting to index outside the collection's bounds /// should throw an error rather than crash. /// /// Upon failure, implementers should throw an error from `JSON.Error`. - func valueInArray(array: [JSON]) throws -> JSON + func value(in array: [JSON]) throws -> JSON } extension JSONPathType { /// The default behavior for keying into a dictionary is to throw /// `JSON.Error.UnexpectedSubscript`. - public func valueInDictionary(dictionary: [Swift.String : JSON]) throws -> JSON { - throw JSON.Error.UnexpectedSubscript(type: Self.self) + public func value(in dictionary: [String : JSON]) throws -> JSON { + throw JSON.Error.unexpectedSubscript(type: Self.self) } /// The default behavior for indexing into an array is to throw /// `JSON.Error.UnexpectedSubscript`. - public func valueInArray(array: [JSON]) throws -> JSON { - throw JSON.Error.UnexpectedSubscript(type: Self.self) + public func value(in array: [JSON]) throws -> JSON { + throw JSON.Error.unexpectedSubscript(type: Self.self) } } @@ -49,12 +49,13 @@ extension JSONPathType { extension String: JSONPathType { /// A method used to retrieve a value from a given dictionary for a specific key. + /// - parameter dictionary: A `Dictionary` with `String` keys and `JSON` values. /// - throws: `.KeyNotFound` with an associated value of `self`, where `self` is a `String`, /// should the key not be present within the `JSON`. /// - returns: The `JSON` value associated with the given key. - public func valueInDictionary(dictionary: [Swift.String : JSON]) throws -> JSON { + public func value(in dictionary: [String : JSON]) throws -> JSON { guard let next = dictionary[self] else { - throw JSON.Error.KeyNotFound(key: self) + throw JSON.Error.keyNotFound(key: self) } return next } @@ -64,12 +65,13 @@ extension String: JSONPathType { extension Int: JSONPathType { /// A method used to retrieve a value from a given array for a specific index. + /// - parameter array: An `Array` of `JSON`. /// - throws: `.IndexOutOfBounds` with an associated value of `self`, where `self` is an `Int`, /// should the index not be within the valid range for the array of `JSON`. /// - returns: The `JSON` value found at the given index. - public func valueInArray(array: [JSON]) throws -> JSON { + public func value(in array: [JSON]) throws -> JSON { guard case array.indices = self else { - throw JSON.Error.IndexOutOfBounds(index: self) + throw JSON.Error.indexOutOfBounds(index: self) } return array[self] } @@ -80,27 +82,27 @@ extension Int: JSONPathType { private extension JSON { - enum SubscriptError: ErrorType { - case SubscriptIntoNull(JSONPathType) + enum SubscriptError: Swift.Error { + case subscriptIntoNull(JSONPathType) } - func valueForPathFragment(fragment: JSONPathType, detectNull: Swift.Bool) throws -> JSON { + func value(for pathFragment: JSONPathType, detectingNull: Bool) throws -> JSON { switch self { - case .Null where detectNull: - throw SubscriptError.SubscriptIntoNull(fragment) - case let .Dictionary(dict): - return try fragment.valueInDictionary(dict) - case let .Array(array): - return try fragment.valueInArray(array) + case .null where detectingNull: + throw SubscriptError.subscriptIntoNull(pathFragment) + case let .dictionary(dict): + return try pathFragment.value(in: dict) + case let .array(array): + return try pathFragment.value(in: array) default: - throw Error.UnexpectedSubscript(type: fragment.dynamicType) + throw Error.unexpectedSubscript(type: type(of: pathFragment)) } } - func valueAtPath(path: [JSONPathType], detectNull: Swift.Bool = false) throws -> JSON { + func value(at path: [JSONPathType], detectingNull: Bool = false) throws -> JSON { var result = self - for fragment in path { - result = try result.valueForPathFragment(fragment, detectNull: detectNull) + for pathFragment in path { + result = try result.value(for: pathFragment, detectingNull: detectingNull) } return result } @@ -111,12 +113,12 @@ private extension JSON { extension JSON { - public subscript(key: Swift.String) -> JSON? { - return try? valueForPathFragment(key, detectNull: false) + public subscript(key: String) -> JSON? { + return try? value(for: key, detectingNull: false) } - public subscript(index: Swift.Int) -> JSON? { - return try? valueForPathFragment(index, detectNull: false) + public subscript(index: Int) -> JSON? { + return try? value(for: index, detectingNull: false) } } @@ -140,76 +142,90 @@ extension JSON { /// corresponding `JSON` value. /// * `TypeNotConvertible`: The target value's type inside of /// the `JSON` instance does not match `Decoded`. - public func decode(path: JSONPathType..., type: Decoded.Type = Decoded.self) throws -> Decoded { - return try Decoded(json: valueAtPath(path)) + public func decode(at path: JSONPathType..., type: Decoded.Type = Decoded.self) throws -> Decoded { + return try Decoded(json: value(at: path)) } /// Retrieves a `Double` from a path into JSON. /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` /// - returns: A floating-point `Double` - /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`. - /// - seealso: `JSON.decode(_:type:)` - public func double(path: JSONPathType...) throws -> Swift.Double { - return try Swift.Double(json: valueAtPath(path)) + /// - throws: One of the `JSON.Error` cases thrown by `decode(at:type:)`. + /// - seealso: `JSON.decode(at:type:)` + public func getDouble(at path: JSONPathType...) throws -> Double { + return try Double(json: value(at: path)) } /// Retrieves an `Int` from a path into JSON. /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` /// - returns: A numeric `Int` - /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`. - /// - seealso: `JSON.decode(_:type:)` - public func int(path: JSONPathType...) throws -> Swift.Int { - return try Swift.Int(json: valueAtPath(path)) + /// - throws: One of the `JSON.Error` cases thrown by `decode(at:type:)`. + /// - seealso: `JSON.decode(at:type:)` + public func getInt(at path: JSONPathType...) throws -> Int { + return try Int(json: value(at: path)) } /// Retrieves a `String` from a path into JSON. /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` /// - returns: A textual `String` - /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`. - /// - seealso: `JSON.decode(_:type:)` - public func string(path: JSONPathType...) throws -> Swift.String { - return try Swift.String(json: valueAtPath(path)) + /// - throws: One of the `JSON.Error` cases thrown by `decode(at:type:)`. + /// - seealso: `JSON.decode(at:type:)` + public func getString(at path: JSONPathType...) throws -> String { + return try String(json: value(at: path)) } /// Retrieves a `Bool` from a path into JSON. /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` /// - returns: A truthy `Bool` - /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`. - /// - seealso: `JSON.decode(_:type:)` - public func bool(path: JSONPathType...) throws -> Swift.Bool { - return try Swift.Bool(json: valueAtPath(path)) + /// - throws: One of the `JSON.Error` cases thrown by `decode(at:type:)`. + /// - seealso: `JSON.decode(at:type:)` + public func getBool(at path: JSONPathType...) throws -> Bool { + return try Bool(json: value(at: path)) } /// Retrieves a `[JSON]` from a path into JSON. /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` /// - returns: An `Array` of `JSON` elements - /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`. - /// - seealso: `JSON.decode(_:type:)` - public func array(path: JSONPathType...) throws -> [JSON] { - return try JSON.getArray(valueAtPath(path)) + /// - throws: One of the `JSON.Error` cases thrown by `decode(at:type:)`. + /// - seealso: `JSON.decode(at:type:)` + public func getArray(at path: JSONPathType...) throws -> [JSON] { + return try JSON.getArray(from: value(at: path)) } - /// Attempts to decodes many values from a desendant JSON array at a path + /// Attempts to decode many values from a descendant JSON array at a path /// into JSON. /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` /// - parameter type: If the context this method is called from does not /// make the return type clear, pass a type implementing `JSONDecodable` /// to disambiguate the type to decode with. /// - returns: An `Array` of decoded elements - /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`, or + /// - throws: One of the `JSON.Error` cases thrown by `decode(at:type:)`, or /// any error that arises from decoding the contained values. - /// - seealso: `JSON.decode(_:type:)` - public func arrayOf(path: JSONPathType..., type: Decoded.Type = Decoded.self) throws -> [Decoded] { - return try JSON.getArrayOf(valueAtPath(path)) + /// - seealso: `JSON.decode(at:type:)` + public func decodedArray(at path: JSONPathType..., type: Decoded.Type = Decoded.self) throws -> [Decoded] { + return try JSON.decodedArray(from: value(at: path)) } /// Retrieves a `[String: JSON]` from a path into JSON. /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` /// - returns: An `Dictionary` of `String` mapping to `JSON` elements - /// - throws: One of the `JSON.Error` cases thrown by `decode(_:type:)`. - /// - seealso: `JSON.decode(_:type:)` - public func dictionary(path: JSONPathType...) throws -> [Swift.String: JSON] { - return try JSON.getDictionary(valueAtPath(path)) + /// - throws: One of the `JSON.Error` cases thrown by `decode(at:type:)`. + /// - seealso: `JSON.decode(at:type:)` + public func getDictionary(at path: JSONPathType...) throws -> [String: JSON] { + return try JSON.getDictionary(from: value(at: path)) + } + + /// Attempts to decode many values from a descendant JSON object at a path + /// into JSON. + /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` + /// - parameter type: If the context this method is called from does not + /// make the return type clear, pass a type implementing `JSONDecodable` + /// to disambiguate the value type to decode with. + /// - returns: A `Dictionary` of `String` keys and decoded values. + /// - throws: One of the `JSON.Error` cases thrown by `decode(at:type:)` or + /// any error that arises from decoding the contained values. + /// - seealso: `JSON.decode(at:type:)` + public func decodedDictionary(at path: JSONPathType..., type: Decoded.Type = Decoded.self) throws -> [String: Decoded] { + return try JSON.decodedDictionary(from: value(at: path)) } } @@ -221,9 +237,9 @@ extension JSON { /// An `OptionSetType` used to represent the different options available for subscripting `JSON` with `null` values or missing keys. /// * `.NullBecomesNil` - Treat `null` values as `nil`. /// * `.MissingKeyBecomesNil` - Treat missing keys as `nil`. - public struct SubscriptingOptions: OptionSetType { - public let rawValue: Swift.Int - public init(rawValue: Swift.Int) { + public struct SubscriptingOptions: OptionSet { + public let rawValue: Int + public init(rawValue: Int) { self.rawValue = rawValue } @@ -233,20 +249,20 @@ extension JSON { public static let MissingKeyBecomesNil = SubscriptingOptions(rawValue: 1 << 1) } - private func mapOptionalAtPath(path: [JSONPathType], alongPath: SubscriptingOptions, @noescape transform: JSON throws -> Value) throws -> Value? { - let detectNull = alongPath.contains(.NullBecomesNil) - let detectNotFound = alongPath.contains(.MissingKeyBecomesNil) + fileprivate func mapOptional(at path: [JSONPathType], alongPath options: SubscriptingOptions, transform: (JSON) throws -> Value) throws -> Value? { + let detectNull = options.contains(.NullBecomesNil) + let detectNotFound = options.contains(.MissingKeyBecomesNil) var json: JSON? do { - json = try valueAtPath(path, detectNull: detectNull) + json = try value(at: path, detectingNull: detectNull) return try json.map(transform) - } catch Error.IndexOutOfBounds where detectNotFound { + } catch Error.indexOutOfBounds where detectNotFound { return nil - } catch Error.KeyNotFound where detectNotFound { + } catch Error.keyNotFound where detectNotFound { return nil - } catch Error.ValueNotConvertible where detectNull && json == .Null { + } catch Error.valueNotConvertible where detectNull && json == .null { return nil - } catch SubscriptError.SubscriptIntoNull where detectNull { + } catch SubscriptError.subscriptIntoNull where detectNull { return nil } } @@ -254,6 +270,17 @@ extension JSON { extension JSON { + /// Decodes a `JSON` instance if it is not `.Null`, throws otherwise. + /// - parameter json: An instance of `JSON`. + /// - returns: An instance of some type that conforms to `JSONDecodable`. + /// - throws: `Error.ValueNotConvertible` if the `JSON` instance is `.Null`. + private static func getDecoded(json: JSON) throws -> Decoded { + guard json != .null else { + throw Error.valueNotConvertible(value: json, to: Decoded.self) + } + return try Decoded.init(json: json) + } + /// Optionally decodes into the returning type from a path into JSON. /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing. @@ -271,8 +298,8 @@ extension JSON { /// * `TypeNotConvertible`: The target value's type inside of the `JSON` /// instance does not match the decoded value. /// * Any error that arises from decoding the value. - public func decode(path: JSONPathType..., alongPath options: SubscriptingOptions, type: Decoded.Type = Decoded.self) throws -> Decoded? { - return try mapOptionalAtPath(path, alongPath: options, transform: Decoded.init) + public func decode(at path: JSONPathType..., alongPath options: SubscriptingOptions, type: Decoded.Type = Decoded.self) throws -> Decoded? { + return try mapOptional(at: path, alongPath: options, transform: JSON.getDecoded) } /// Optionally retrieves a `Double` from a path into JSON. @@ -288,8 +315,8 @@ extension JSON { /// corresponding `JSON` value. /// * `TypeNotConvertible`: The target value's type inside of the `JSON` /// instance does not match the decoded value. - public func double(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Swift.Double? { - return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Double.init) + public func getDouble(at path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Double? { + return try mapOptional(at: path, alongPath: options, transform: Double.init) } /// Optionally retrieves a `Int` from a path into JSON. @@ -305,8 +332,8 @@ extension JSON { /// corresponding `JSON` value. /// * `TypeNotConvertible`: The target value's type inside of the `JSON` /// instance does not match the decoded value. - public func int(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Swift.Int? { - return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Int.init) + public func getInt(at path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Int? { + return try mapOptional(at: path, alongPath: options, transform: Int.init) } /// Optionally retrieves a `String` from a path into JSON. @@ -322,8 +349,8 @@ extension JSON { /// corresponding `JSON` value. /// * `TypeNotConvertible`: The target value's type inside of the `JSON` /// instance does not match the decoded value. - public func string(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Swift.String? { - return try mapOptionalAtPath(path, alongPath: options, transform: Swift.String.init) + public func getString(at path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> String? { + return try mapOptional(at: path, alongPath: options, transform: String.init) } /// Optionally retrieves a `Bool` from a path into JSON. @@ -339,8 +366,8 @@ extension JSON { /// corresponding `JSON` value. /// * `TypeNotConvertible`: The target value's type inside of the `JSON` /// instance does not match the decoded value. - public func bool(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Swift.Bool? { - return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Bool.init) + public func getBool(at path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> Bool? { + return try mapOptional(at: path, alongPath: options, transform: Bool.init) } /// Optionally retrieves a `[JSON]` from a path into the recieving structure. @@ -357,14 +384,17 @@ extension JSON { /// corresponding `JSON` value. /// * `TypeNotConvertible`: The target value's type inside of the `JSON` /// instance does not match the decoded value. - public func array(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> [JSON]? { - return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArray) + public func getArray(at path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> [JSON]? { + return try mapOptional(at: path, alongPath: options, transform: JSON.getArray) } /// Optionally decodes many values from a descendant array at a path into /// JSON. /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing. + /// - parameter type: If the context this method is called from does not + /// make the return type clear, pass a type implementing `JSONDecodable` + /// to disambiguate the value type to decode with. /// - returns: An `Array` of decoded elements if found, otherwise `nil`. /// - throws: One of the following errors contained in `JSON.Error`: /// * `KeyNotFound`: A key `path` does not exist inside a descendant @@ -376,8 +406,8 @@ extension JSON { /// * `TypeNotConvertible`: The target value's type inside of the `JSON` /// instance does not match the decoded value. /// * Any error that arises from decoding the value. - public func arrayOf(path: JSONPathType..., alongPath options: SubscriptingOptions, type: Decoded.Type = Decoded.self) throws -> [Decoded]? { - return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArrayOf) + public func decodedArray(at path: JSONPathType..., alongPath options: SubscriptingOptions, type: Decoded.Type = Decoded.self) throws -> [Decoded]? { + return try mapOptional(at: path, alongPath: options, transform: JSON.decodedArray) } /// Optionally retrieves a `[String: JSON]` from a path into the recieving @@ -395,8 +425,31 @@ extension JSON { /// corresponding `JSON` value. /// * `TypeNotConvertible`: The target value's type inside of the `JSON` /// instance does not match the decoded value. - public func dictionary(path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> [Swift.String: JSON]? { - return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getDictionary) + public func getDictionary(at path: JSONPathType..., alongPath options: SubscriptingOptions) throws -> [String: JSON]? { + return try mapOptional(at: path, alongPath: options, transform: JSON.getDictionary) + } + + /// Optionally attempts to decode many values from a descendant object at a path + /// into JSON. + /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` + /// - parameter alongPath: Options that control what should be done with values that are `null` or keys that are missing. + /// - parameter type: If the context this method is called from does not + /// make the return type clear, pass a type implementing `JSONDecodable` + /// to disambiguate the value type to decode with. + /// - returns: A `Dictionary` of `String` mapping to decoded elements if a + /// value could be found, otherwise `nil`. + /// - throws: One of the following errors contained in `JSON.Error`: + /// * `KeyNotFound`: A key `path` does not exist inside a descendant + /// `JSON` dictionary. + /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a + /// descendant `JSON` array. + /// * `UnexpectedSubscript`: A `path` item cannot be used with the + /// corresponding `JSON` value. + /// * `TypeNotConvertible`: The target value's type inside of the `JSON` + /// instance does not match the decoded value. + /// * Any error that arises from decoding the value. + public func decodedDictionary(at path: JSONPathType..., alongPath options: SubscriptingOptions, type: Decoded.Type = Decoded.self) throws -> [String: Decoded]? { + return try mapOptional(at: path, alongPath: options, transform: JSON.decodedDictionary) } } @@ -405,8 +458,8 @@ extension JSON { extension JSON { - private func mapOptionalAtPath(path: [JSONPathType], @noescape fallback: () -> Value, @noescape transform: JSON throws -> Value) throws -> Value { - return try mapOptionalAtPath(path, alongPath: .MissingKeyBecomesNil, transform: transform) ?? fallback() + fileprivate func mapOptional(at path: [JSONPathType], fallback: () -> Value, transform: (JSON) throws -> Value) throws -> Value { + return try mapOptional(at: path, alongPath: .MissingKeyBecomesNil, transform: transform) ?? fallback() } /// Attempts to decode into the returning type from a path into @@ -419,23 +472,22 @@ extension JSON { /// corresponding `JSON` value. /// * `TypeNotConvertible`: The target value's type inside of /// the `JSON` instance does not match `Decoded`. - public func decode(path: JSONPathType..., @autoclosure or fallback: () -> Decoded) throws -> Decoded { - return try mapOptionalAtPath(path, fallback: fallback, transform: Decoded.init) + public func decode(at path: JSONPathType..., or fallback: @autoclosure() -> Decoded) throws -> Decoded { + return try mapOptional(at: path, fallback: fallback, transform: Decoded.init) } /// Retrieves a `Double` from a path into JSON or a fallback if not found. /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` - /// - parameter fallback: Array to use when one is missing at the subscript. + /// - parameter fallback: `Double` to use when one is missing at the subscript. /// - returns: A floating-point `Double` - /// - throws: One of the `JSON.Error` cases thrown by calling `mapOptionalAtPath(_:fallback:transform:)`. - /// - seealso: `optionalAtPath(_:ifNotFound)`. - public func double(path: JSONPathType..., @autoclosure or fallback: () -> Swift.Double) throws -> Swift.Double { - return try mapOptionalAtPath(path, fallback: fallback, transform: Swift.Double.init) + /// - throws: One of the `JSON.Error` cases thrown by calling `mapOptional(at:fallback:transform:)`. + public func getDouble(at path: JSONPathType..., or fallback: @autoclosure() -> Double) throws -> Double { + return try mapOptional(at: path, fallback: fallback, transform: Double.init) } /// Retrieves an `Int` from a path into JSON or a fallback if not found. /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` - /// - parameter fallback: Array to use when one is missing at the subscript. + /// - parameter fallback: `Int` to use when one is missing at the subscript. /// - returns: A numeric `Int` /// - throws: One of the following errors contained in `JSON.Error`: /// * `KeyNotFound`: A key `path` does not exist inside a descendant @@ -446,13 +498,13 @@ extension JSON { /// corresponding `JSON` value. /// * `TypeNotConvertible`: The target value's type inside of the `JSON` /// instance does not match the decoded value. - public func int(path: JSONPathType..., @autoclosure or fallback: () -> Swift.Int) throws -> Swift.Int { - return try mapOptionalAtPath(path, fallback: fallback, transform: Swift.Int.init) + public func getInt(at path: JSONPathType..., or fallback: @autoclosure() -> Int) throws -> Int { + return try mapOptional(at: path, fallback: fallback, transform: Int.init) } /// Retrieves a `String` from a path into JSON or a fallback if not found. /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` - /// - parameter fallback: Array to use when one is missing at the subscript. + /// - parameter fallback: `String` to use when one is missing at the subscript. /// - returns: A textual `String` /// - throws: One of the following errors contained in `JSON.Error`: /// * `KeyNotFound`: A key `path` does not exist inside a descendant @@ -463,13 +515,13 @@ extension JSON { /// corresponding `JSON` value. /// * `TypeNotConvertible`: The target value's type inside of the `JSON` /// instance does not match the decoded value. - public func string(path: JSONPathType..., @autoclosure or fallback: () -> Swift.String) throws -> Swift.String { - return try mapOptionalAtPath(path, fallback: fallback, transform: Swift.String.init) + public func getString(at path: JSONPathType..., or fallback: @autoclosure() -> String) throws -> String { + return try mapOptional(at: path, fallback: fallback, transform: String.init) } /// Retrieves a `Bool` from a path into JSON or a fallback if not found. /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` - /// - parameter fallback: Array to use when one is missing at the subscript. + /// - parameter fallback: `Bool` to use when one is missing at the subscript. /// - returns: A truthy `Bool` /// - throws: One of the following errors contained in `JSON.Error`: /// * `KeyNotFound`: A key `path` does not exist inside a descendant @@ -480,13 +532,13 @@ extension JSON { /// corresponding `JSON` value. /// * `TypeNotConvertible`: The target value's type inside of the `JSON` /// instance does not match the decoded value. - public func bool(path: JSONPathType..., @autoclosure or fallback: () -> Swift.Bool) throws -> Swift.Bool { - return try mapOptionalAtPath(path, fallback: fallback, transform: Swift.Bool.init) + public func getBool(at path: JSONPathType..., or fallback: @autoclosure() -> Bool) throws -> Bool { + return try mapOptional(at: path, fallback: fallback, transform: Bool.init) } /// Retrieves a `[JSON]` from a path into JSON or a fallback if not found. /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` - /// - parameter fallback: Array to use when one is missing at the subscript. + /// - parameter fallback: `Array` to use when one is missing at the subscript. /// - returns: An `Array` of `JSON` elements /// - throws: One of the following errors contained in `JSON.Error`: /// * `KeyNotFound`: A key `path` does not exist inside a descendant @@ -497,14 +549,14 @@ extension JSON { /// corresponding `JSON` value. /// * `TypeNotConvertible`: The target value's type inside of the `JSON` /// instance does not match the decoded value. - public func array(path: JSONPathType..., @autoclosure or fallback: () -> [JSON]) throws -> [JSON] { - return try mapOptionalAtPath(path, fallback: fallback, transform: JSON.getArray) + public func getArray(at path: JSONPathType..., or fallback: @autoclosure() -> [JSON]) throws -> [JSON] { + return try mapOptional(at: path, fallback: fallback, transform: JSON.getArray) } /// Attempts to decodes many values from a desendant JSON array at a path /// into the recieving structure, returning a fallback if not found. /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` - /// - parameter fallback: Array to use when one is missing at the subscript. + /// - parameter fallback: `Array` to use when one is missing at the subscript. /// - returns: An `Array` of decoded elements /// - throws: One of the following errors contained in `JSON.Error`: /// * `KeyNotFound`: A key `path` does not exist inside a descendant @@ -516,14 +568,14 @@ extension JSON { /// * `TypeNotConvertible`: The target value's type inside of the `JSON` /// instance does not match the decoded value. /// * Any error that arises from decoding the value. - public func arrayOf(path: JSONPathType..., @autoclosure or fallback: () -> [Decoded]) throws -> [Decoded] { - return try mapOptionalAtPath(path, fallback: fallback, transform: JSON.getArrayOf) + public func decodedArray(at path: JSONPathType..., or fallback: @autoclosure() -> [Decoded]) throws -> [Decoded] { + return try mapOptional(at: path, fallback: fallback, transform: JSON.decodedArray) } /// Retrieves a `[String: JSON]` from a path into JSON or a fallback if not /// found. /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` - /// - parameter fallback: Value to use when one is missing at the subscript + /// - parameter fallback: `Dictionary` to use when one is missing at the subscript. /// - returns: An `Dictionary` of `String` mapping to `JSON` elements /// - throws: One of the following errors contained in `JSON.Error`: /// * `KeyNotFound`: A key `path` does not exist inside a descendant @@ -534,110 +586,28 @@ extension JSON { /// corresponding `JSON` value. /// * `TypeNotConvertible`: The target value's type inside of the `JSON` /// instance does not match the decoded value. - public func dictionary(path: JSONPathType..., @autoclosure or fallback: () -> [Swift.String: JSON]) throws -> [Swift.String: JSON] { - return try mapOptionalAtPath(path, fallback: fallback, transform: JSON.getDictionary) + public func getDictionary(at path: JSONPathType..., or fallback: @autoclosure() -> [String: JSON]) throws -> [String: JSON] { + return try mapOptional(at: path, fallback: fallback, transform: JSON.getDictionary) } -} - -// MARK: - Deprecated methods - -extension JSON { - - @available(*, deprecated, message="Use 'decode(_:alongPath:type:)' with options '[.MissingKeyBecomesNil]'") - public func decode(path: JSONPathType..., ifNotFound: Swift.Bool, type: Decoded.Type = Decoded.self) throws -> Decoded? { - let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : [] - return try mapOptionalAtPath(path, alongPath: options, transform: Decoded.init) - } - - @available(*, deprecated, message="Use 'decode(_:alongPath:type:)' with options '[.NullBecomesNil]'") - public func decode(path: JSONPathType..., ifNull: Swift.Bool, type: Decoded.Type = Decoded.self) throws -> Decoded? { - let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : [] - return try mapOptionalAtPath(path, alongPath: options, transform: Decoded.init) - } - - @available(*, deprecated, message="Use 'double(_:alongPath:)' with options '[.MissingKeyBecomesNil]'") - public func double(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> Swift.Double? { - let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : [] - return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Double.init) - } - - @available(*, deprecated, message="Use 'double(_:alongPath:)' with options '[.NullBecomesNil]'") - public func double(path: JSONPathType..., ifNull: Swift.Bool) throws -> Swift.Double? { - let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : [] - return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Double.init) - } - - @available(*, deprecated, message="Use 'int(_:alongPath:)' with options '[.MissingKeyBecomesNil]'") - public func int(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> Swift.Int? { - let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : [] - return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Int.init) - } - - @available(*, deprecated, message="Use 'int(_:alongPath:)' with options '[.NullBecomesNil]'") - public func int(path: JSONPathType..., ifNull: Swift.Bool) throws -> Swift.Int? { - let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : [] - return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Int.init) - } - - @available(*, deprecated, message="Use 'string(_:alongPath:)' with options '[.MissingKeyBecomesNil]'") - public func string(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> Swift.String? { - let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : [] - return try mapOptionalAtPath(path, alongPath: options, transform: Swift.String.init) - } - - @available(*, deprecated, message="Use 'string(_:alongPath:)' with options '[.NullBecomesNil]'") - public func string(path: JSONPathType..., ifNull: Swift.Bool) throws -> Swift.String? { - let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : [] - return try mapOptionalAtPath(path, alongPath: options, transform: Swift.String.init) - } - - @available(*, deprecated, message="Use 'bool(_:alongPath:)' with options '[.MissingKeyBecomesNil]'") - public func bool(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> Swift.Bool? { - let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : [] - return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Bool.init) - } - - @available(*, deprecated, message="Use 'bool(_:alongPath:)' with options '[.NullBecomesNil]'") - public func bool(path: JSONPathType..., ifNull: Swift.Bool) throws -> Swift.Bool? { - let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : [] - return try mapOptionalAtPath(path, alongPath: options, transform: Swift.Bool.init) - } - - @available(*, deprecated, message="Use 'array(_:alongPath:)' with options '[.MissingKeyBecomesNil]'") - public func array(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> [JSON]? { - let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : [] - return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArray) - } - - @available(*, deprecated, message="Use 'array(_:alongPath:)' with options '[.NullBecomesNil]'") - public func array(path: JSONPathType..., ifNull: Swift.Bool) throws -> [JSON]? { - let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : [] - return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArray) - } - - @available(*, deprecated, message="Use 'arrayOf(_:alongPath:)' with options '[.MissingKeyBecomesNil]'") - public func arrayOf(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> [Decoded]? { - let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : [] - return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArrayOf) - } - - @available(*, deprecated, message="Use 'arrayOf(_:alongPath:)' with options '[.NullBecomesNil]'") - public func arrayOf(path: JSONPathType..., ifNull: Swift.Bool) throws -> [Decoded]? { - let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : [] - return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getArrayOf) - } - - @available(*, deprecated, message="Use 'dictionary(_:alongPath:)' with options '[.MissingKeyBecomesNil]'") - public func dictionary(path: JSONPathType..., ifNotFound: Swift.Bool) throws -> [Swift.String: JSON]? { - let options: SubscriptingOptions = ifNotFound ? [.MissingKeyBecomesNil] : [] - return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getDictionary) - } - - @available(*, deprecated, message="Use 'dictionary(_:alongPath:)' with options '[.NullBecomesNil]'") - public func dictionary(path: JSONPathType..., ifNull: Swift.Bool) throws -> [Swift.String: JSON]? { - let options: SubscriptingOptions = ifNull ? [.NullBecomesNil] : [] - return try mapOptionalAtPath(path, alongPath: options, transform: JSON.getDictionary) + /// Attempts to decode many values from a descendant JSON object at a path + /// into the receiving structure, returning a fallback if not found. + /// - parameter path: 0 or more `String` or `Int` that subscript the `JSON` + /// - parameter fallback: Value to use when one is missing at the subscript + /// - returns: A `Dictionary` of `String` mapping to decoded elements. + /// - throws: One of the following errors contained in `JSON.Error`: + /// * `KeyNotFound`: A key `path` does not exist inside a descendant + /// `JSON` dictionary. + /// * `IndexOutOfBounds`: An index `path` is outside the bounds of a + /// descendant `JSON` array. + /// * `UnexpectedSubscript`: A `path` item cannot be used with the + /// corresponding `JSON` value. + /// * `TypeNotConvertible`: The target value's type inside of the `JSON` + /// instance does not match the decoded value. + /// * Any error that arises from decoding the value. + public func decodedDictionary(at path: JSONPathType..., or fallback: @autoclosure() -> [String: Decoded]) throws -> [String: Decoded] { + return try mapOptional(at: path, fallback: fallback, transform: JSON.decodedDictionary) } - + + } diff --git a/Pods/Local Podspecs/Astro.podspec.json b/Pods/Local Podspecs/Astro.podspec.json index 175e492..858499f 100644 --- a/Pods/Local Podspecs/Astro.podspec.json +++ b/Pods/Local Podspecs/Astro.podspec.json @@ -18,9 +18,12 @@ "tag": "2.0.0" }, "platforms": { - "ios": "8.0" + "ios": "9.0" }, "requires_arc": true, + "pod_target_xcconfig": { + "SWIFT_VERSION": "3.0" + }, "subspecs": [ { "name": "Logging", @@ -37,10 +40,10 @@ "~> 4.0" ], "Freddy": [ - "3.0.0" + "~> 3.0" ], "SwiftTask": [ - "5.0" + "~> 5.0" ] } }, diff --git a/Pods/Local Podspecs/SwiftTask.podspec.json b/Pods/Local Podspecs/SwiftTask.podspec.json new file mode 100644 index 0000000..6b443a8 --- /dev/null +++ b/Pods/Local Podspecs/SwiftTask.podspec.json @@ -0,0 +1,24 @@ +{ + "name": "SwiftTask", + "version": "5.0.0", + "license": { + "type": "MIT" + }, + "homepage": "https://github.com/ReactKit/SwiftTask", + "authors": { + "Yasuhiro Inami": "inamiy@gmail.com" + }, + "summary": "Promise + progress + pause + cancel + retry for Swift.", + "source": { + "git": "https://github.com/ReactKit/SwiftTask.git", + "tag": "5.0.0" + }, + "source_files": "SwiftTask/**/*.{h,swift}", + "requires_arc": true, + "platforms": { + "osx": "10.9", + "ios": "8.0", + "watchos": "2.0", + "tvos": "9.0" + } +} diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock index d4a9644..41acc67 100644 --- a/Pods/Manifest.lock +++ b/Pods/Manifest.lock @@ -1,49 +1,57 @@ PODS: - - Alamofire (3.5.0) - - Astro (1.1.0): - - Astro/Logging (= 1.1.0) - - Astro/Networking (= 1.1.0) - - Astro/Security (= 1.1.0) - - Astro/UI (= 1.1.0) - - Astro/Utils (= 1.1.0) - - Astro/Logging (1.1.0) - - Astro/Networking (1.1.0): - - Alamofire (~> 3.3) + - Alamofire (4.0.0) + - Astro (2.0.0): + - Astro/Logging (= 2.0.0) + - Astro/Networking (= 2.0.0) + - Astro/Security (= 2.0.0) + - Astro/UI (= 2.0.0) + - Astro/Utils (= 2.0.0) + - Astro/Logging (2.0.0) + - Astro/Networking (2.0.0): + - Alamofire (~> 4.0) - Astro/Logging - - Freddy (~> 2.0) - - SwiftTask (= 5.0) - - Astro/Security (1.1.0): + - Freddy (~> 3.0) + - SwiftTask (~> 5.0) + - Astro/Security (2.0.0): - Astro/Logging - - Astro/UI (1.1.0) - - Astro/Utils (1.1.0) - - Freddy (2.1.0) + - Astro/UI (2.0.0) + - Astro/Utils (2.0.0) + - Freddy (3.0.0) - Nimble (4.1.0) - Nocilla (0.11.0) - Quick (0.9.3) - SwiftTask (5.0.0) DEPENDENCIES: - - Alamofire (~> 3.5) + - Alamofire (~> 4.0) - Astro (from `.`) - - Freddy (~> 2.1) + - Freddy (~> 3.0) - Nimble (~> 4.1) - Nocilla (~> 0.11) - Quick (~> 0.9) - - SwiftTask (~> 5.0) + - SwiftTask (from `https://github.com/ReactKit/SwiftTask`, branch `swift/3.0`) EXTERNAL SOURCES: Astro: - :path: . + :path: "." + SwiftTask: + :branch: swift/3.0 + :git: https://github.com/ReactKit/SwiftTask + +CHECKOUT OPTIONS: + SwiftTask: + :commit: fb4af8a4e853eb62f0418f870cfb9ae1cf618961 + :git: https://github.com/ReactKit/SwiftTask SPEC CHECKSUMS: - Alamofire: b70a7352335f8ea5babd0a923eb7e8eacc67b877 - Astro: b02e8db13f5ed43a6a8e52fc5b994d5647f9f434 - Freddy: bbdca013977db29638b24baf6572ce94452bec29 + Alamofire: fef59f00388f267e52d9b432aa5d93dc97190f14 + Astro: 4cd8e4a684989a0506e48e548fea2c452476091e + Freddy: 367f994c88a90dd3987293b4b1bec94a4530745a Nimble: 97a0a4cae5124c117115634b2d055d8c97d0af19 Nocilla: 7af7a386071150cc8aa5da4da97d060f049dd61c Quick: 13a2a2b19a5d8e3ed4fd0c36ee46597fd77ebf71 SwiftTask: 7fcd92f8ac16876e82c0e4ced0cea7e028456b6b -PODFILE CHECKSUM: bf8bba49840cacfd0f5a3521a329338860c29863 +PODFILE CHECKSUM: f28a2792f198f6b40c60f63e6c4b93ce9b6ecab8 -COCOAPODS: 1.0.1 +COCOAPODS: 1.1.0.rc.2 diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index d2c0346..369595a 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -9,20 +9,22 @@ /* Begin PBXBuildFile section */ 0072016FECB4F11D51CF666F71713F9E /* NSString+Nocilla.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DA8F5655DFE6949CA30A88FD740A18B /* NSString+Nocilla.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 01FB80B2F451C84E420EF3464F5BA926 /* LSHTTPClientHook.m in Sources */ = {isa = PBXBuildFile; fileRef = DB998CB4C2F2B143F59EEE0FE9D1274D /* LSHTTPClientHook.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 02411A2CA73A4024FDD335D6E08970AF /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = C003AAA0D11CDA242DD3A3C5AEA13800 /* QuickTestSuite.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 025A65355371D3AD706C8D334D8AE4EA /* SwiftTask-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 29DB305A733900DA8BE91E99DA1F6678 /* SwiftTask-dummy.m */; }; - 02768FD7624F8269944D5B2F6F6FA849 /* Pods-AstroTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CB1530548D1D9E85E0CA807FE68F4B5 /* Pods-AstroTests-dummy.m */; }; + 037277A5335F4706D656E27E5DD15D11 /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = B1E3F6C9016D030279790B508587F4F5 /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0467369F19D8A99FD4F12FCA92C4D0D4 /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87A7B61AC940A1FD19E52AE798DB0361 /* Match.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 073CCD3D1AE9A6857F9DC0CFAA511F6A /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = E67AD8E1BA3D5AE433588B5D864123CA /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0A3806CD95128F25EE8B4C806FC19522 /* LSStubResponseDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 6ABDA7E71C2F0EA181105310A6FC9F60 /* LSStubResponseDSL.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 0A560EBC0C04B8BBACD9799150B7F691 /* UIView+AstroGadgets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A44E47EFD289B10910E4FDA903A2E9F /* UIView+AstroGadgets.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 0A56DFB216D6CBFDE7D38CC82A56C714 /* Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF2D557873185C73BE025D1BBE21A10 /* Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0A7381A552E9A17370BA555076EAC4CD /* NibLoadableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C76B609C247B56F32515A6D847A8799 /* NibLoadableView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 0A9A1B8CB1963791ADDF67361E687CAA /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = CB1DDBDCCC983F8C7DBAE01E30388C2D /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0BC644233E7FC0A53C9BA5EC6B87A206 /* NSRegularExpression+Matcheable.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BD5AAB63C0A5D8E5DC6EE658F519C3E /* NSRegularExpression+Matcheable.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 0D96C808906230C689C8310AC8E7DF5B /* LSNSURLSessionHook.h in Headers */ = {isa = PBXBuildFile; fileRef = D7E2DFFAF9C53B8870CECB5F7F64089D /* LSNSURLSessionHook.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 10E5217B88726E3ADF9F527A88A78661 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A84B567667740EA1C67D0C60C243975 /* MultipartFormData.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 11D702668C883B3F7432A61A48FCCB41 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23AFD3DA2A1EE218A39A93ACE7800FEA /* Configuration.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 11DFBA22CC629A4D5E4F9F4A3E05B75F /* UICollectionView+AstroGadgets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35BD3EF4780C95F238BF55A79833BFFC /* UICollectionView+AstroGadgets.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 11E8E61CBBF1A019E711DE8E55F513D4 /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40766F0C467159B985AA2723FF099609 /* Log.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 128B9A07E9D0F95B28E5F1F3483CB7EA /* LSASIHTTPRequestAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = A49E53C084F80BE60CCD84F9475612BF /* LSASIHTTPRequestAdapter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 13202614FB4A2465FD5D212AC6393DE6 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32F951BB01951EDE7DBBC6FC707493C6 /* Request.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 15A7217C749314E8423F3C36A99BAF7A /* LSHTTPStubURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 06DA7638B59C97A622CF8EC4E26CBF68 /* LSHTTPStubURLProtocol.h */; settings = {ATTRIBUTES = (Project, ); }; }; 161201824EE3922A10F509AB4F2DB523 /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5395BBA7A071CBF3AFE75B515C61368 /* BeCloseTo.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 179AC473A3676744F7C995FA8E680064 /* XCTestObservationCenter+Register.m in Sources */ = {isa = PBXBuildFile; fileRef = 334E9C3CECC5351EE96F55569E1FCEDD /* XCTestObservationCenter+Register.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; @@ -31,34 +33,35 @@ 1C46D0414C094C95AD85104D38B72539 /* LSMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D1F363DAC6ADA834FD28B2BA055E4F7 /* LSMatcher.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 1CE0C305D051ECE68B8BD3FDBC3EE4D9 /* SwiftTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C3BAC8C7B9A07799DE46B602D115B02 /* SwiftTask.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1D00380CB24FD873D03376CC6E9C55E1 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 213754F1822D3389F0626B85751B244C /* DSL.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 206541BC9991EE86512D593D96EA83B3 /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1D362BF523A9A5F5597677017D9479B /* Closures.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 1DD2CCAC7B2E2F5BAE6C0199EC87D7C0 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DF25ABEEAE287B7BAF35696B5ABBB4F /* ParameterEncoding.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 201D66DFA5AB096795ACF405E47F4FF0 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8605659EDD36D55482C9DB2EBE1A8A33 /* TaskDelegate.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 2070701995190A07047F664492D7F156 /* LSNocilla.h in Headers */ = {isa = PBXBuildFile; fileRef = 59A8DB2950CDF625EDB83CE63F46A6F6 /* LSNocilla.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2179DCAF26B5FDFE0367910B2CE6A19B /* JSONSubscripting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BE2DE3A06C049929FED7B6EA5BD77C1 /* JSONSubscripting.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 21B9BDF15D08F33883999509AC98847C /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4D54383DE9F48DD36B48F77E57BF01E /* CFNetwork.framework */; }; - 22E176E365EF446AD2ACADC28199A3DE /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFDC167F51D907DA3C0BB648440C27F7 /* DSL.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 236EB99AF4ED58D8A5B3E9F8B1A0246D /* NSString+QCKSelectorName.m in Sources */ = {isa = PBXBuildFile; fileRef = 78E2E262C85B2AF1456483A15F4328E4 /* NSString+QCKSelectorName.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 23F9469701D519F1496D3030618FD84B /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15AB7D4A43EBBAA638AF047CF1486BC7 /* World.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 24B569099A40F837596002531AEBBE6C /* Nocilla-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F2A3A410983B0ACAC5571383B99CAB2D /* Nocilla-dummy.m */; }; - 250B90954338EEFB0EBC6DAA23894DDA /* Stream.swift in Sources */ = {isa = PBXBuildFile; fileRef = D731BEB44F07F8750E7A220ECD34E71F /* Stream.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 25364C0863486C882DDDBC76B42C4C3E /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 0381DB03287A652D133655CC87C0F3EC /* NMBStringify.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 270FEEBAE0671C72A82B3CEE2F771E0B /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D2A40F21DB871AF2ED94C5485E0AE82 /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; 27832B2605A37241AF9CD554C9ECB6D0 /* LSASIHTTPRequestHook.h in Headers */ = {isa = PBXBuildFile; fileRef = FED3C10BB4D401609B8331544CF4494B /* LSASIHTTPRequestHook.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 288B407C1861C325D63558155BE51969 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CF4E2387106F9611DD108F7757030E3 /* Notifications.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 28E95AFD51820CD5CF9BB968BAF17DF6 /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 512114DC23E7E8EE7A0AF19D564A8039 /* Timeline.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 291D078FB76A0C70A15A0ED41D435BC8 /* Pods-AstroTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4997DBF40D15DC61455083F9414614A8 /* Pods-AstroTests-dummy.m */; }; 2BC2F1D0EDC01B4314095492D16E1AC4 /* LSStubRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = EC68F3FFC9D47A8F658D2289435BE266 /* LSStubRequest.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 2DBDF5B701DC699F0E5A0ADCFF7F3E94 /* NSURLRequest+LSHTTPRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A7976230AA3F6FF83457AAFFCC39F987 /* NSURLRequest+LSHTTPRequest.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2F2E9CFF89016043EAF1D3885AC7C696 /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = B1E3F6C9016D030279790B508587F4F5 /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 30A99A47BC4031E7C5677314FDBF61A6 /* Pods-Astro-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4046EBF9B062ED9B23FAB96D07561CA0 /* Pods-Astro-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2DE56E9710CC81260C08A20961ACCE6E /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6190D3DCC555A20AEBF4FE28A41C942 /* AFError.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 30A99A47BC4031E7C5677314FDBF61A6 /* Pods-Astro-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 01969FDB7BE5215049329E2826518627 /* Pods-Astro-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 30F0DD2AAF62C4A402C220E07E8C6C98 /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F9A86574F2A7071B2058EF9649F9F4F /* AllPass.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 32A4654CFE28CA25FF57109B50458608 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03C4A91411BA8D06FCB83DB7EB88B2D9 /* Filter.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 351E7765D3B3ADCA308F5A1844DC6761 /* LSNSURLHook.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F781DA3105FD0D4D698C91B2303DE66 /* LSNSURLHook.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 369F9F7F2F3492C0A2083F156FB1E1D9 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94D3C32D2459BA35E799A27B7A23B1D8 /* RaisesException.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 383F4AF6C46AA6AC9F9217AF905FB7D8 /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = A22E256F88A3E352A2DC4C81AC6067DD /* Timeline.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 39E1878913C1AD8669DA18845D2BC218 /* LSRegexMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 546BBA0E106E3A9EF12D5EE0C95B0462 /* LSRegexMatcher.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 3B3B4E109B651C524ECF52AAF1888D93 /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7743BBD05243D52E271CDAD63F5B989A /* SatisfyAnyOf.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 3B4F15B3D4EBB8580874CFA87CAAB437 /* LSDataMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F16FD68893A2ED451E86E1599F8FC16 /* LSDataMatcher.h */; settings = {ATTRIBUTES = (Project, ); }; }; 3B588A1AD8E3D88B70EF1A8D3CF519ED /* LSHTTPRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = B175E85AD5037C0096B0195D51B93034 /* LSHTTPRequest.h */; settings = {ATTRIBUTES = (Project, ); }; }; 3BA67C86ED6B34936485F11775AB6847 /* LSASIHTTPRequestAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 489CA6D4A92715860DCDDFDB61B71884 /* LSASIHTTPRequestAdapter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 3C0916C48CA10162D3762D798BC0B110 /* String+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC674E21556741A41DAFF6F06A257444 /* String+FileName.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 3C380C634D63206648B6D947901FF88D /* NSData+Nocilla.h in Headers */ = {isa = PBXBuildFile; fileRef = 612F5B7DAD9D03A91ED5FC2A20417E03 /* NSData+Nocilla.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3CD7D0CFD42577B550E17FB682EA74F4 /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA005D7A247CDFA9BFAE4F33F1950A4 /* Example.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 3CF89E18D971D0C887BAC515B1955234 /* SwiftTask-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 90458BEF3622BBC8AA13B41F18337D64 /* SwiftTask-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 40B6973E8E5464C0C97726DC08D36735 /* Manager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01D4FCB7E6BA5636A790080020124EFD /* Manager.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 3D8752CE38A3F42C824F6C25BEF128BD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; 4253F20907FA7DA4F0CF6E404BC9C15B /* NSURLRequest+LSHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 12ADD80150F556C531DE5DA952B00FCF /* NSURLRequest+LSHTTPRequest.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 4339A9964176E715E909554ED062D717 /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80FFBF4F48BE6A503B8C04F7EE392ED1 /* EndWith.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 43FE60867B789DBF20EF2183F9D77EEF /* _RecursiveLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58FC63C8CBFD7E521F24241853DF5C14 /* _RecursiveLock.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; @@ -67,32 +70,35 @@ 4846BC919D685D1A6927C22B319BF5BB /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = A651FAABB8A4D3C1B0C9EF7C6EEFE8BC /* AssertionRecorder.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 4B0FACF86699832CB060706698EEDA62 /* LSRegexMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 94914DECE29A7AF99992E91B0D97AA9B /* LSRegexMatcher.h */; settings = {ATTRIBUTES = (Project, ); }; }; 4FF8A2C2644173400B8E4CC7BE4D6D77 /* LSHTTPRequestDSLRepresentation.m in Sources */ = {isa = PBXBuildFile; fileRef = F2EED208FA3C8DC3E0FF81F145DF3C84 /* LSHTTPRequestDSLRepresentation.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 514A09BBB819F361E14EA3435507C489 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A31C32B204D02D4C7C690D920E63CCD /* ServerTrustPolicy.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 517677321A634907F92B81A1B04EE27C /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADED1DCB14A4876F2717EF125915C71C /* Response.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 51F46241DBFA48BE6840E89B60B5C761 /* LSNocilla.m in Sources */ = {isa = PBXBuildFile; fileRef = 5022140F377B8260DCB428BF0F20E52C /* LSNocilla.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 52695B80D42DFB4C48D7A906478509EB /* ASIHTTPRequestStub.h in Headers */ = {isa = PBXBuildFile; fileRef = 071801FD957F89FDFD4A42FA1CE52621 /* ASIHTTPRequestStub.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 535D3135B94BEAB04C06E35B082E903E /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = C003AAA0D11CDA242DD3A3C5AEA13800 /* QuickTestSuite.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 540A9D15A35FC96C9836AFE59201DD8C /* Route.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F5F08345597F020F21A5AD51E29EE4D /* Route.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 5546B5D9DA48D039B6AA3267D7B6EAE5 /* LSHTTPRequestDiff.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D6F8C4B96CC18FA8D2EB43CFD0EF551 /* LSHTTPRequestDiff.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 55E2DC8C6E93D6A0A34C31686200ADA5 /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C2C94ED0D97068FC1CCAFB424107CBF /* BeginWith.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 589210F372BC6A8D77D483BD1540D849 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51D68EE622CCBC2517A7E3842815620D /* ServerTrustPolicy.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 59BF94BC2C9C7AEBF10547516224E504 /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396035A274BE85E2A79A14557F188DE9 /* AsyncMatcherWrapper.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 5C50D4DC86334599B9967449D88C8449 /* LSDataMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B9BB65FFA5699B6F2A3494430B04909 /* LSDataMatcher.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 5D344495D94126F483F7FC0947959CAC /* Freddy-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2511DF7B5065EB4197A4B475803F14 /* Freddy-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5D90870C3016C64BE441B6731D4FA960 /* JSONParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49C52E23E4263893DB7947504A16DF2C /* JSONParser.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 5E532421F8D123918FC5A9EEBAA516E7 /* NetworkServiceLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = E408DAA6184E7EAB179A403F5D1274DA /* NetworkServiceLogger.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 617FB9A348751ECB4250ABA0316403AC /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = E67AD8E1BA3D5AE433588B5D864123CA /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5FD768C424450A19511BA433803546B7 /* World+DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 9012B52BD1D693879482A5B36C189E9A /* World+DSL.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 618631F3121DDE6420DB7A834BE996D6 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFDC167F51D907DA3C0BB648440C27F7 /* DSL.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 6316792FA4B2C39F6E00413B7CC7DCC2 /* UITableView+AstroGadgets.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1BECFF57B794BF840211E16075E843B /* UITableView+AstroGadgets.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 63F83D6FFDA4A20864206D5CA7507315 /* NSString+QCKSelectorName.h in Headers */ = {isa = PBXBuildFile; fileRef = BA18B1B763EDA6EBEFF2B9002A0B4538 /* NSString+QCKSelectorName.h */; settings = {ATTRIBUTES = (Project, ); }; }; 683D42CCDBA04DEAA5927130555865FB /* LSStringMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = F1A19438A8C71AB3785FC2728ACF7D35 /* LSStringMatcher.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 68DEA79938C67989D4B1DAE9A477CC34 /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C12E2AC29BB461B5CA36A55A98309C9 /* QuickConfiguration.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 69BB92468361D788FD8E866A0997194C /* ReusableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 877BF995E72F2E8878B207A8C0E9D3D3 /* ReusableView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 6AAD3EF28C1C2DA026B93AD8D814F64D /* Nocilla-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8E32FEBF48A8DF57EF672939A794ED19 /* Nocilla-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6E34C836D8E7066A01CE21FFE17C35C7 /* Freddy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41D136DE7AD7FCE83428ECEF04EDC1F7 /* Freddy.framework */; }; + 6F0D2A0EB1839F6661685B993584676F /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A355A0E9474F123020DFB6D08415B7E /* World+DSL.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 6F22E6AD6E840224D60B79003945E74D /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17937D695835B2FAFA87680EBD2DDEEB /* Expression.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 6F9AC619478339681794CFB2FFF49EA3 /* LSStubRequestDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = D599F054E4FE2159DEF282CBE0E31DFA /* LSStubRequestDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7070E1BDFFD9D6D40C6ED465BD5C58CB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; + 707C7BA834D3573C883AE24BEEC1BBC3 /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = D5663CF2A9C80609B52068DAB5F86C8E /* QCKDSL.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 71190327DD1ABA3B8168BA3C5899C384 /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AD11791D91B1E8BE6A15A123CCD5ABB /* JSON.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 719B7010C936E7C78C61110452A3B33C /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7F5275B4193E841C3997C48E6EFE373 /* BeAKindOf.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 71E52833B614749DD58941AB12CDFBBB /* Pods-Astro-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6CA7B27079A3AE437FFB717B6CEB7766 /* Pods-Astro-dummy.m */; }; - 73000FB0D08D09BCAFF0052F746E2749 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; - 734D4E9CBF9F977A8B62365C32ED517B /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = E764963DD2E875F513366A19344714B6 /* MultipartFormData.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 71E52833B614749DD58941AB12CDFBBB /* Pods-Astro-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FC4B28D110AB0D170E2F97D415B8E6E9 /* Pods-Astro-dummy.m */; }; 73C671D884BB1EBC50D22264C30ACBF0 /* LSNSURLSessionHook.m in Sources */ = {isa = PBXBuildFile; fileRef = BC2FBAEA7B0E5E601D62EF9567B9A1D3 /* LSNSURLSessionHook.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 746762DD022722AA0783532E872ACCC0 /* LSHTTPBody.h in Headers */ = {isa = PBXBuildFile; fileRef = 1053740C7A0A2C8875D945447E55AF4E /* LSHTTPBody.h */; settings = {ATTRIBUTES = (Public, ); }; }; 74A3FAE2302123E379CA7F5EEB2AD19A /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1E3046BF9FB565B47238131ADA779CE /* Equal.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; @@ -101,18 +107,19 @@ 781A3371065498563238D5E4E7F7BC49 /* LSStubResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 9108B9F77C510C7B00290542C62100BA /* LSStubResponse.h */; settings = {ATTRIBUTES = (Project, ); }; }; 7A3FEC3C8303482043DB7C0A6184BF08 /* ASIHTTPRequestStub.m in Sources */ = {isa = PBXBuildFile; fileRef = 12C64E971D6125A9DD3C66125BC78175 /* ASIHTTPRequestStub.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 7B58011958B21BE947D3AB53CC88EAEC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; - 7BA96342CEA620B4EDDD7C5D42B8446B /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA005D7A247CDFA9BFAE4F33F1950A4 /* Example.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 7BB2B96575CFE48BF2A8813B03DA4068 /* Freddy-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BFC88CB4D2A5E653FE76097D9DCAEA4B /* Freddy-dummy.m */; }; - 7CF0F6A48A0677DE2908A8D931A99ADC /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D2A40F21DB871AF2ED94C5485E0AE82 /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7BE489F32BE286EB24CA28BEE8FCA4FE /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D6F35F873EE68AC1B849C53C8377143 /* NSBundle+CurrentTestBundle.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 7D635AC46655BFC2E195DF3B10284A36 /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 53A987C36D5AF811928370956EDA6F7B /* DSL.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 7DB5BAB83F6D611D2518C7219D18B16F /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 846E1484C4DB60242A6128EEC54F4CB4 /* SessionManager.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 7F88BF11FA9A34E488A69DEA8D3474B1 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF14E7E64D23B07812BAF0C10D193605 /* Alamofire.framework */; }; 7FD79232CED05EBA71CC5800B233A875 /* JSONSerializing.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF1351BCB4B31A4D1E8A625409BDF310 /* JSONSerializing.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 80C451D6026B1C2BF6EF917B4F5BF98B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; 80EA474E7F3BF83093D617F1D7B13693 /* JSONParsing.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3D5F8E522B317FBBEBB08F1E2BF775F /* JSONParsing.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 826517FF4AF1F646EE0FDC01B6C82722 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305F507D0BC868E0EFA0E492C50BB344 /* ExampleHooks.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 82D1A45C067C46EA182F5271C7CF8398 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16052B2D8A55F982B608750D0064FD9E /* Alamofire.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 82EB4519BD169631C09074DFC535E4B6 /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = D5663CF2A9C80609B52068DAB5F86C8E /* QCKDSL.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 863E32885CF961E10C349860B945D58C /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2479CF9F42A48561B5CB97BEDF88A0EF /* Error.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 81755C0A977CEA435BBCCD2C7E6DF8FE /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2B3E7999D62C38A0ADE7FC63494B885 /* SuiteHooks.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 817C1ED23C18514E67277900D668B028 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24AB3FEDC733FF0C724BA4579F65C1CB /* Notifications.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 82122FF76AB199158E5EF889C4E0DC2A /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FD76D017AEEF056A8FC7A05D8562C2D /* XCTestSuite+QuickTestSuiteBuilder.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 8335A65095F73165ACB070AA3BE0973D /* World.h in Headers */ = {isa = PBXBuildFile; fileRef = 550E4A859435509BAB6638D3E05ED846 /* World.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 84CFEA055A12E312DA45E1AB5C64306D /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = 377FF62898B9F233DAEAC2A03F7ED71F /* ExampleMetadata.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 866830C585216CA87A15D078A28C410A /* CurrentTestCaseTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = DD52F0E3E4688A2CE0A07E04DA911577 /* CurrentTestCaseTracker.h */; settings = {ATTRIBUTES = (Private, ); }; }; 8679D94B1C5A51B76CE4064A36FD2F07 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B831039D667484298E44CC97352C424 /* MatcherFunc.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 88A36E7B64F0A565C806F29E83FF0B4F /* Nimble-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 52371319E2C73E2815BF88ED9A42E25F /* Nimble-dummy.m */; }; @@ -122,42 +129,37 @@ 89C4DF92D207FE3E5AA480B967699CBE /* NMBObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6496FB4F8515747A0F9E50DC22B36E11 /* NMBObjCMatcher.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 8AC936C1872CED091BEDD5BBB43FBE3E /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B337EA4DB32DBBF01A45AD2DA159EEB /* Async.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 8BC79A9A7061C7E12A864E19C6928038 /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981C0D8B96C81FA46A629CACA3982AD6 /* BeNil.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 8E1F57D1096BDAA008D4D0EFEEBCB284 /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AB54E1DE71B88A7C5744C4262CC89A2 /* SessionDelegate.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 8E6F6C967E8A0D0F0E0CB1383BE70BCE /* UIViewController+AstroGadgets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25D7A7C2951F50118DCBAC7528F922D9 /* UIViewController+AstroGadgets.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 8F83B5ED706BFAA72FC788835E165942 /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = 377FF62898B9F233DAEAC2A03F7ED71F /* ExampleMetadata.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 8F86133FD6D0F537A52D317518115BC5 /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = DA2117C0F3C548AD5CC636A142BE9CD6 /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8FDE9405A930F8277771A142D150C660 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 213513F3A16D2DF21DBB9B616F107E33 /* Functional.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 90D8EB6C28E1D64FE32D9A66EFFC23C5 /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FF542340635F5EE3FFBD29F13A8B80E /* BeLessThanOrEqual.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 91C09AC2A52ED69A27C8D923139A006F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; - 924BB4EFA04157C8C446B30422705105 /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A355A0E9474F123020DFB6D08415B7E /* World+DSL.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 929FE93E64765FF5AE1BFBA880F12F4C /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BEAFEE666D85EA288AF1A32B5F69FAF /* ErrorUtility.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 939557CC5200D195ED671322163AF7B2 /* JSONLiteralConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = E19A03D34F45F64F617E816C9EFB0D92 /* JSONLiteralConvertible.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 9469DF81ECB494E84675969B5E13374C /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E3B4638026BD3B6BBB9EF7535E899EF5 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9590790CA8C71CFF36DBF303367C65BE /* String+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC674E21556741A41DAFF6F06A257444 /* String+FileName.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 9469DF81ECB494E84675969B5E13374C /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 99B26536B75CF50E75382CF77F5F68B4 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 963E33529852F9EFB574D6160CDDE7D6 /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 0173D589AE58B242AF1C54C7B7C4A174 /* QuickSpec.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 98448E68F706C3077F402B1F1B64520E /* NSData+Matcheable.h in Headers */ = {isa = PBXBuildFile; fileRef = 04ABE7FAC5DD55B63509FCD2B4FC184E /* NSData+Matcheable.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9B078190829C71BDE57F32CA21580BF0 /* LSHTTPStubURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E54E0A32D638DABAAE1938E085649F5 /* LSHTTPStubURLProtocol.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 9B27F32E5D611571AF5233DCEF8CB00C /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = F313245E710FF08DD42E94F62560C21A /* QuickSelectedTestSuiteBuilder.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 9BFC09FB900963AF0813771CE5858CFB /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2C900ACA8C6D4A9FD8AC095F0B30764 /* Errors.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 9C5DF5EA387519C5C1B8FA73FBE0014E /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FD76D017AEEF056A8FC7A05D8562C2D /* XCTestSuite+QuickTestSuiteBuilder.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 9C9F50D58E6F3B5AA5F58598ED7F561C /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16A97930F8C7CD98BB75727908A6CEEF /* Result.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 9D4229388B9B2081A1D461BD753C12AF /* Freddy.h in Headers */ = {isa = PBXBuildFile; fileRef = F952371ED40FD33BA4B9D7AE9F6420AF /* Freddy.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9F37AC5BEC60E4932EDCC5DD0E05E33A /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEE475B600741EFE0262B7D1DCC75083 /* MatchError.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 9FC466460AAC0031C09C37F09A3DF032 /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CDCD82A818E6E82200A01860040B5C7 /* BeGreaterThan.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - A13F241863C06A82E01A3486274BAA3B /* Download.swift in Sources */ = {isa = PBXBuildFile; fileRef = F85639431E17CBB60BF656426BB168D6 /* Download.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; A1F69DD3961B60955EFD28E2BDF446E8 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = 4029957B3F8655025D5D20920ED34752 /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; A3ACA641503E24BD47E8AF10D4907A39 /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DA20E139146E66B853599325D0EB814 /* BeIdenticalTo.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; A434C8CB0F23A35DA222105C7B11300D /* LSHTTPRequestDiff.h in Headers */ = {isa = PBXBuildFile; fileRef = 73C18D240C638526F78D36934DAA00DC /* LSHTTPRequestDiff.h */; settings = {ATTRIBUTES = (Project, ); }; }; A460983620B3719092C5217CCC57A699 /* LSHTTPRequestDSLRepresentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 75B4742BC7EE5F35B53FF4C55C5E6B64 /* LSHTTPRequestDSLRepresentation.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A47EF77A104A17550B47ECB220523317 /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = DA2117C0F3C548AD5CC636A142BE9CD6 /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A49866E583A9E617BA24334FBF8BF658 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305F507D0BC868E0EFA0E492C50BB344 /* ExampleHooks.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; A63164B84A22C7E0FDF3A30121CEE861 /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E35D5AB5C88B5BA0D575B5E6440C639 /* BeGreaterThanOrEqualTo.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; A6A54F64F620A12FB4845FAA238206A7 /* NSData+Nocilla.m in Sources */ = {isa = PBXBuildFile; fileRef = 26497E5736035420A6E2C4002BFCA9B2 /* NSData+Nocilla.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - A8F7B821E99BED8460534AD85FD1F269 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; AA6C0D448D1C9BFB4CBA1C3D1C8831D4 /* _Atomic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78D81935F9929A6DFE89C95A30163613 /* _Atomic.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - AB6DD25D9C52C34F62068EB8635763F6 /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 054E3AE9685647513F4760BCC648C0FA /* HooksPhase.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - ABD57ABE0CA2D5E9EDDB246A64C1AD1D /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = B789B85D4CF17532F49A10E9C5F8D9EC /* Callsite.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - AC0BD0F23C2A8C8F350899F45DB4F91F /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F85A4BB288510912A1612AEB7FF0F5 /* Validation.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - AC0F9DEB7167B144AD3A2175E0D48B8B /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D6F35F873EE68AC1B849C53C8377143 /* NSBundle+CurrentTestBundle.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + AC3B78B98A81CCCA230DA7A0BC4F10B1 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03C4A91411BA8D06FCB83DB7EB88B2D9 /* Filter.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; AC7E5AC1841D836761B4154BE0B43D29 /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AC20E208201C4090E34097C86AA98A7 /* Expectation.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; AE04A2A6667D3A3ECAF7599774E0176A /* SwiftTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81B287AAADD69D3417422AE070927E44 /* SwiftTask.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + AE48DED43213E899DE5D21D14C7369AE /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BEAFEE666D85EA288AF1A32B5F69FAF /* ErrorUtility.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; B0BD13A01F667B129F4F5F167088A024 /* Nocilla.h in Headers */ = {isa = PBXBuildFile; fileRef = CDF5736D9D7A92F8E27A62AEF194A5D3 /* Nocilla.h */; settings = {ATTRIBUTES = (Public, ); }; }; B30D380B5EFCD54FEE04D3C4F1988262 /* NSString+Nocilla.h in Headers */ = {isa = PBXBuildFile; fileRef = D057E3DA74D706A5230C38A2A8DA23BA /* NSString+Nocilla.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B37592A64C36F09413FA486F83F789F0 /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = F313245E710FF08DD42E94F62560C21A /* QuickSelectedTestSuiteBuilder.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; B44CA6989B931C025C7BB2B9F5CEB4D6 /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C829808D86197B50D8483528E538747 /* BeLessThan.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; B4545BA7D7D3C52247DAD0E39B5E8D5F /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB517BF9DAFFCA1BBCC5A0BBCB5B1A73 /* Queue.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; B47F2B1F7F5FEC4CE62F09832392E842 /* Nimble-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8499C88CD54A0B131F08D126D46C7B9E /* Nimble-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -167,69 +169,74 @@ B7BAA1610C192270DE28D6F9ACE95542 /* LSStubResponseDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 77F6A5367DD6585F38FE4EAE6E016F14 /* LSStubResponseDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; B8C5A113F98D10AE527D439BD26EE33F /* LSStubResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 419B8EC230B0AF8A2877C52EDD18C518 /* LSStubResponse.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; BAB651A8F623A6E827FC716A62B9F74D /* LSStringMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = F63BB0F4518DCE933B9046B940D5A9B1 /* LSStringMatcher.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - BAE69CD22A7C90828180D3664DED8E1A /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6B2DBA6A0515637450DCF30D86FE191 /* Result.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - BE2859F1F4050BADFDDF76A557CF0FE7 /* World.h in Headers */ = {isa = PBXBuildFile; fileRef = 550E4A859435509BAB6638D3E05ED846 /* World.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BDDBBC50E7CFA0438AD014013745029F /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21295EB820534EBAAEB5834DBCE02CC8 /* ExampleGroup.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; BE3B29F8DC00244F423717A62D73A7AC /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = 964D61122C046B2ED058B18F3E45CD99 /* BeLogical.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - BE5AF0662CD8B472503A8E996260B213 /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 0173D589AE58B242AF1C54C7B7C4A174 /* QuickSpec.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + BF25DD2EB63D29FFA2369A4D3DEB6974 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = D478996036C1B8667C7EC683C038F598 /* ResponseSerialization.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; C0E5761D5C684C0B64BF30671EE532AD /* NetworkService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D62BB50E8E9E3730D17977D8D21E7D3E /* NetworkService.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; C10D511DA9B280D88FBA356D13F94B6D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; C1F5A2A34221F5EB192F4D5C1D1A932A /* JSONEncodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5633C1C5B848893399B6AAF45417707 /* JSONEncodable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + C29FA5992EF67D6893321BDDC131C54C /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FA8866188D58E727285A4F69385A638 /* Alamofire-dummy.m */; }; C2BF15D99BFF62CB041E6AA875DA501F /* JSONEncodingDetector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C47C4F0D9B36F88D240C445B404CA9A /* JSONEncodingDetector.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; C375CF1D80C1EDAF7A59CF55A204A1EA /* LSASIHTTPRequestHook.m in Sources */ = {isa = PBXBuildFile; fileRef = 13982F321AEFE4FC8A435F23B9E0B951 /* LSASIHTTPRequestHook.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; C3ECA19252054094471F35AE516C0C30 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; C4F4C8EF4A764C0FDEB5789F9207FFF2 /* LSNSURLHook.h in Headers */ = {isa = PBXBuildFile; fileRef = 5990DDE7DB7FAD5BF27CAC2D99935E28 /* LSNSURLHook.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C86923E3A6648C9DE493F465644EE071 /* Upload.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4B7C333666D8E4ED3351DDC9C538FEB /* Upload.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; C8A640AC4989B36283DB3E0CE1CB1ADD /* Cancellable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1ED1CA7206A0394D9BE404F9CFCD177D /* Cancellable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; C908B67E55D22EF3E34AB19171FFC0A0 /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 75556B87747C12614320AAF5CB884BEF /* NMBExceptionCapture.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + C964261AAFC1EA02B9305022B88C398A /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1D362BF523A9A5F5597677017D9479B /* Closures.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; CA00C21F8A03E237E579CD6DA42B0DF0 /* LSMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = B4AF807EB366D473D7D2C7B4CAED09FC /* LSMatcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; CA303CF6D30D41F05C81DF35576B6C34 /* LSMatcheable.h in Headers */ = {isa = PBXBuildFile; fileRef = 82B9AF145DEC704D066D60237E7CBDBB /* LSMatcheable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CAFBD098436FD07E8838B47730DCF021 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BCA294AF3615B183F578E3E71D213E3 /* XCTest.framework */; }; CB4924760FF11BC55A5545D970CD9233 /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = BECF439ED63F91CEA1E08C23AAE18336 /* PostNotification.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; CCDFB6611155BB0F4831F06A1A8E63C2 /* NSString+Matcheable.m in Sources */ = {isa = PBXBuildFile; fileRef = EEF30250E18C7F3BC7A5DC0599B4CC6B /* NSString+Matcheable.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - CFE6E0DA62CC3C0AA51C460558431C28 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFCF05EC1DA60395794F91AEBC1D4A73 /* Response.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - D017DC2887E3EF5201451BAF25519567 /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21295EB820534EBAAEB5834DBCE02CC8 /* ExampleGroup.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + CDC8E7BC4F6D7941783CA1669F3AEC18 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 475A05A4D234AEB496174CD3ECE69914 /* NetworkReachabilityManager.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + D026942696BBAE215298038689DF4952 /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = B789B85D4CF17532F49A10E9C5F8D9EC /* Callsite.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; D0EEF6529F24EF7C1EABEF919A3B1D2F /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF8967CDBD8BA88C5396C98EDDE31851 /* BeAnInstanceOf.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; D1FF865FECBBEC7089ACA994F1C0AA48 /* LSStubRequestDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 5005FBED4883E5ECB521DFF686AF8E4E /* LSStubRequestDSL.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; D2B3B8A5532F9F084D2855970798CB82 /* LSHTTPClientHook.h in Headers */ = {isa = PBXBuildFile; fileRef = D39098627F8A63B173221DD4453E1816 /* LSHTTPClientHook.h */; settings = {ATTRIBUTES = (Project, ); }; }; D7684539AFE9926F12A51A1DBBDEDAD8 /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A2033086B25E850845B6A7EF6B59A56 /* DSL+Wait.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + D7A646B09D05BD9423A1629EC6CC662B /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 054E3AE9685647513F4760BCC648C0FA /* HooksPhase.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; D9646B319A6BBF5191BB979D007B19F5 /* UIColor+AstroGadgets.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDD291DBB3F60DEB32D3F9C5F08524ED /* UIColor+AstroGadgets.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; DB1E4BBCDC5993D6A360DF4CF5B59FE2 /* BeVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B67C20266A4C50A1C347EA85C1B8814 /* BeVoid.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + DB294A14E23364B8B2B4E46FD8677FFB /* Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2767B46482B0569CB7A3D8A5171E1481 /* Quick-dummy.m */; }; DB2D57B1574B84BC7A733F47613080DC /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2684360A9E22977194A9F7BAC3580666 /* AdapterProtocols.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - DBB0527ADF9440FEF442BE39801F8585 /* Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2767B46482B0569CB7A3D8A5171E1481 /* Quick-dummy.m */; }; DC7E1C63312C0B4B7C76E6C9C4F1949C /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5346D1563A1A298C988CF5F943C093A /* AssertionDispatcher.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; DE94765732B7FBCD78E56173F4A782ED /* LSStubRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CE296A8C853B548D6A84BD8B5CFB0E8 /* LSStubRequest.h */; settings = {ATTRIBUTES = (Project, ); }; }; E003A741B5F295E49BB25972DDCD3EC2 /* EnumCountable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F511D0AF6267ABF4691C1EDE99FB659D /* EnumCountable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; E07A45CD453CFC98DE69AA370E5780F9 /* NSRegularExpression+Matcheable.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DF421BBCDC5566E84F21FCB2FD3C914 /* NSRegularExpression+Matcheable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E08122859DE3AE6BEA6079C4BA6A758D /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C12E2AC29BB461B5CA36A55A98309C9 /* QuickConfiguration.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + E1A024733661B5738EE3884FB7AB4984 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BCA294AF3615B183F578E3E71D213E3 /* XCTest.framework */; }; E39FF06D1FA27A05A466E7F2BD57563A /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = E54303E2686DF60500CC0A595F9B66D0 /* Stringers.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - E42A03C03AF789E657C8A1D228A725C2 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73280D5446213683E79903637BE80ED2 /* ParameterEncoding.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - E5257C3F4110DEEA78306240DEB2333F /* World+DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 9012B52BD1D693879482A5B36C189E9A /* World+DSL.h */; settings = {ATTRIBUTES = (Project, ); }; }; E8ABE21E14978ABC608F931E1E91039E /* HTTPStatusCode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 327D1EF3F0D47051C002D2C9724D5581 /* HTTPStatusCode.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; E8DC5C8D0C37517C1E9309C63EFED4D0 /* Astro-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = AD7D87EC77CCE2F8C0B6D5BD0C78F808 /* Astro-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; EADDC14CBF173E01401098091976B5F9 /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D0153C0D9E5372AD43FC81C52526302 /* NMBExpectation.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; EB9C4D2E388805F9157AA356D4A857D5 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = D04E964F3DB35CE6A55222A2A22E06CA /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; EC336944FCF11CEC2C298BFD54B1B863 /* NSData+Matcheable.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BFE4E270087F7D5D4D3C85F001C5D61 /* NSData+Matcheable.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; EC5A747B55D5C84C98D096A78A4DCACE /* Astro-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CF059E9D75DEFA1FC51BA89F96FCD54 /* Astro-dummy.m */; }; - EDB7BCD432FD07A284C407A4B1F5C0A1 /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15AB7D4A43EBBAA638AF047CF1486BC7 /* World.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - EDBD0FB0C34E68F787748DED462CAE6D /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40533FF767EB585B3433B67FB9C5BC77 /* ResponseSerialization.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + ED1BA82935766174DD32423269DFAF7F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; + ED4D59B3E02651D2E5C2A0545F7AB611 /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A83BCB83F2572A3251B13551F69A138 /* DispatchQueue+Alamofire.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; EE9BD67665F455A58EB00E695FD2BE3F /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D2CCF46E1B0888E24EB6F6B0E532B2 /* ThrowError.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; F1F1BBE3F7808250C4C027D5A7780F7A /* SwiftTask.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDE84FF0D7B9663C062BD966122BCA44 /* SwiftTask.framework */; }; - F2096C950FB8A9662DF8BD15AC7E8BBB /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23AFD3DA2A1EE218A39A93ACE7800FEA /* Configuration.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + F253A82332FB27BF37823F9D25B938B4 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A481A909D77FF7E93DD19C841760A26 /* Request.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; F2A1A21D2EF54169CC88B33BD85BB6C5 /* KeychainAccess.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F9C1070A7DA056DC96366DD7AB5D032 /* KeychainAccess.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - F4FB5ED9614E6F9838BC0037675F5010 /* Pods-AstroTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F1012B82C8E2EB174EC08743BCE9146E /* Pods-AstroTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F51FDBE0B58714B7CCFC263E262B0842 /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F13E6F474D0524F6981DA5085B0F5B7 /* Alamofire-dummy.m */; }; F5964D54755EA5CA5261EA833C1FC3E1 /* _StateMachine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EF364BB6F5D1DB9851B6BFC10060F2F /* _StateMachine.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + F65BC45BCF2155582AFE03DE625352A3 /* NSString+QCKSelectorName.m in Sources */ = {isa = PBXBuildFile; fileRef = 78E2E262C85B2AF1456483A15F4328E4 /* NSString+QCKSelectorName.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; F682F23BCD82A89264547460CBA9F077 /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA131598253CE58BF21F626715CEF42 /* FailureMessage.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; F76969F8B60A010FAA79D960E251F4EC /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72C14B4911E5A56CEF192041CD902F42 /* BeEmpty.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - F76FAD73B802B3FA5D61EB667A79BC83 /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2B3E7999D62C38A0ADE7FC63494B885 /* SuiteHooks.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + F860A14430F1CACDA8DD8D930D9D31C8 /* Pods-AstroTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2968311D6DF69E6F64E0B003853A1588 /* Pods-AstroTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F90CAA20F341B4B5811A6031B7BBA9B5 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E5DE73C1E1F70D7DECB931C65A67679 /* Alamofire.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; FA1149FAC1E3BDDC971E04A052037DC0 /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3B021591B3A1EAA8BCA339C18A3E219 /* HaveCount.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; FB67CA760B62D85727796D8D68990E4A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D97CC484A2DBEFEC771C1025EBC41CCE /* UIKit.framework */; }; - FB921E2C31223EFB30816D7DB741889B /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99129671E3ADC080472BC0BB32EBB585 /* NetworkReachabilityManager.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + FB7D8621EE4D6676288245B294022C47 /* Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF2D557873185C73BE025D1BBE21A10 /* Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FC55C32A0B9D387BFD57FCB2E19753BE /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA13E6763DFBF5B5D1943920BE89D610 /* Validation.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; FCFC2208684969E5BDF9F439AEE58162 /* NSString+Matcheable.h in Headers */ = {isa = PBXBuildFile; fileRef = E64F5CCF316D56E2C07425CC0D9DCB90 /* NSString+Matcheable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FD31EB5C092198491AFA59C0AA80E33F /* NSString+QCKSelectorName.h in Headers */ = {isa = PBXBuildFile; fileRef = BA18B1B763EDA6EBEFF2B9002A0B4538 /* NSString+QCKSelectorName.h */; settings = {ATTRIBUTES = (Project, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + 0189F1E291F050C04DDE62DE5EFFF95C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 79C040AFDDCE1BCBF6D8B5EB0B85887F; + remoteInfo = Alamofire; + }; 092F98FBAB35E78D80635DC286DE6135 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; @@ -237,12 +244,12 @@ remoteGlobalIDString = 91969E02CD48F26120134D15E489A85C; remoteInfo = Astro; }; - 28C8609FA1466917DCEC3D46AC819CCD /* PBXContainerItemProxy */ = { + 2A44D5A0049F2A17AB1BBC1D5AD5455F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 393E0E1A41299C44C63DBB766A243010; - remoteInfo = Nocilla; + remoteGlobalIDString = E693F703278AF18B59BC7B0FDF7B3650; + remoteInfo = Freddy; }; 44EE941BAC2FB6F90477DA65C72BFFED /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -258,12 +265,12 @@ remoteGlobalIDString = 658D059017BAD944D0775434631CF091; remoteInfo = SwiftTask; }; - 683066C568219244AEA91F2E2AB5065E /* PBXContainerItemProxy */ = { + 598910F769E32B1B71ADD162661845DE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 40FF1C77152F384080A1A02E90A36DA9; - remoteInfo = Nimble; + remoteGlobalIDString = 91969E02CD48F26120134D15E489A85C; + remoteInfo = Astro; }; 6C69E40802B58122DBB0A67FBA0169FB /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -272,6 +279,13 @@ remoteGlobalIDString = 79C040AFDDCE1BCBF6D8B5EB0B85887F; remoteInfo = Alamofire; }; + 891A50011E3559371B2E8F628DB7AEC2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 658D059017BAD944D0775434631CF091; + remoteInfo = SwiftTask; + }; 922746A9F3FCCEE9C3C5F07A603960A0 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; @@ -279,12 +293,12 @@ remoteGlobalIDString = 79C040AFDDCE1BCBF6D8B5EB0B85887F; remoteInfo = Alamofire; }; - 9AC142B18F4D42F065666B4445B18163 /* PBXContainerItemProxy */ = { + A2D07F765E3F2C069C184ADCF3CF7507 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = A806B96D9DEB1A4DB63C09048B2EF00E; - remoteInfo = Quick; + remoteGlobalIDString = 393E0E1A41299C44C63DBB766A243010; + remoteInfo = Nocilla; }; BFE93B7ABE21DBDA8E25F6FE7513DB18 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -293,6 +307,20 @@ remoteGlobalIDString = E693F703278AF18B59BC7B0FDF7B3650; remoteInfo = Freddy; }; + C7DCC15B4B8B580880C05F4D918CF228 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = C8DD2CC4E3F108C6E7F9BFEFBBDF393F; + remoteInfo = Quick; + }; + D3D896A7145B7E3F31F40780A713EE4D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 40FF1C77152F384080A1A02E90A36DA9; + remoteInfo = Nimble; + }; DE2F729048A6ECF6A6C4E1CFFEC59E90 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; @@ -303,12 +331,10 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 0014D967034D35F957148B768101D8F4 /* Pods-AstroTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-AstroTests-resources.sh"; sourceTree = ""; }; 00351519C4E7E45AB67C9AE54E9BC5FF /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 0173D589AE58B242AF1C54C7B7C4A174 /* QuickSpec.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpec.m; path = Sources/Quick/QuickSpec.m; sourceTree = ""; }; 018233AF6177486FA08EDB6B819B8852 /* Nimble.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.xcconfig; sourceTree = ""; }; - 01D4FCB7E6BA5636A790080020124EFD /* Manager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Manager.swift; path = Source/Manager.swift; sourceTree = ""; }; - 02C475E83572D471A01BFD104587CDB7 /* Pods-Astro-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Astro-resources.sh"; sourceTree = ""; }; + 01969FDB7BE5215049329E2826518627 /* Pods-Astro-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Astro-umbrella.h"; sourceTree = ""; }; 0381DB03287A652D133655CC87C0F3EC /* NMBStringify.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBStringify.m; path = Sources/Nimble/Adapters/ObjectiveC/NMBStringify.m; sourceTree = ""; }; 03C4A91411BA8D06FCB83DB7EB88B2D9 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Quick/Filter.swift; sourceTree = ""; }; 04ABE7FAC5DD55B63509FCD2B4FC184E /* NSData+Matcheable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSData+Matcheable.h"; path = "Nocilla/Matchers/NSData+Matcheable.h"; sourceTree = ""; }; @@ -316,7 +342,6 @@ 06DA7638B59C97A622CF8EC4E26CBF68 /* LSHTTPStubURLProtocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPStubURLProtocol.h; path = Nocilla/Hooks/NSURLRequest/LSHTTPStubURLProtocol.h; sourceTree = ""; }; 071801FD957F89FDFD4A42FA1CE52621 /* ASIHTTPRequestStub.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ASIHTTPRequestStub.h; path = Nocilla/Hooks/ASIHTTPRequest/ASIHTTPRequestStub.h; sourceTree = ""; }; 0772C22DA40FABA4BC0475C3951BEB90 /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Nimble.modulemap; sourceTree = ""; }; - 0979C227E7552D43BEF6C85C5E418766 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 0AD11791D91B1E8BE6A15A123CCD5ABB /* JSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSON.swift; path = Sources/JSON.swift; sourceTree = ""; }; 0C12E2AC29BB461B5CA36A55A98309C9 /* QuickConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickConfiguration.m; path = Sources/Quick/Configuration/QuickConfiguration.m; sourceTree = ""; }; 0E30C666974AFD8AE1D15D77D6FAE0D4 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -327,10 +352,9 @@ 12C64E971D6125A9DD3C66125BC78175 /* ASIHTTPRequestStub.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ASIHTTPRequestStub.m; path = Nocilla/Hooks/ASIHTTPRequest/ASIHTTPRequestStub.m; sourceTree = ""; }; 13982F321AEFE4FC8A435F23B9E0B951 /* LSASIHTTPRequestHook.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSASIHTTPRequestHook.m; path = Nocilla/Hooks/ASIHTTPRequest/LSASIHTTPRequestHook.m; sourceTree = ""; }; 15AB7D4A43EBBAA638AF047CF1486BC7 /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Sources/Quick/World.swift; sourceTree = ""; }; - 16052B2D8A55F982B608750D0064FD9E /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - 1640764CAB261E1814B1BA7709848F58 /* Pods-Astro.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Astro.release.xcconfig"; sourceTree = ""; }; + 16A97930F8C7CD98BB75727908A6CEEF /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; 17937D695835B2FAFA87680EBD2DDEEB /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Nimble/Expression.swift; sourceTree = ""; }; - 18894A3E151905AB3BB2BEB1A15E9977 /* Pods-AstroTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-AstroTests.modulemap"; sourceTree = ""; }; + 1AB54E1DE71B88A7C5744C4262CC89A2 /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; 1AC20E208201C4090E34097C86AA98A7 /* Expectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expectation.swift; path = Sources/Nimble/Expectation.swift; sourceTree = ""; }; 1BFE4E270087F7D5D4D3C85F001C5D61 /* NSData+Matcheable.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSData+Matcheable.m"; path = "Nocilla/Matchers/NSData+Matcheable.m"; sourceTree = ""; }; 1CDCD82A818E6E82200A01860040B5C7 /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Sources/Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; @@ -338,50 +362,46 @@ 1D6F35F873EE68AC1B849C53C8377143 /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSBundle+CurrentTestBundle.swift"; path = "Sources/Quick/NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; 1E02FD2E676BD9EBE51D94DD72A393CA /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Sources/Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; 1ED1CA7206A0394D9BE404F9CFCD177D /* Cancellable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancellable.swift; path = SwiftTask/Cancellable.swift; sourceTree = ""; }; - 1F13E6F474D0524F6981DA5085B0F5B7 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; 21295EB820534EBAAEB5834DBCE02CC8 /* ExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleGroup.swift; path = Sources/Quick/ExampleGroup.swift; sourceTree = ""; }; 213513F3A16D2DF21DBB9B616F107E33 /* Functional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Functional.swift; path = Sources/Nimble/Utils/Functional.swift; sourceTree = ""; }; 213754F1822D3389F0626B85751B244C /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Nimble/DSL.swift; sourceTree = ""; }; 23AFD3DA2A1EE218A39A93ACE7800FEA /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Quick/Configuration/Configuration.swift; sourceTree = ""; }; - 2479CF9F42A48561B5CB97BEDF88A0EF /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Source/Error.swift; sourceTree = ""; }; + 24AB3FEDC733FF0C724BA4579F65C1CB /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; 25D7A7C2951F50118DCBAC7528F922D9 /* UIViewController+AstroGadgets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIViewController+AstroGadgets.swift"; sourceTree = ""; }; 25FBBE12B9698BE57E33603547EB37BC /* Freddy.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Freddy.modulemap; sourceTree = ""; }; 26497E5736035420A6E2C4002BFCA9B2 /* NSData+Nocilla.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSData+Nocilla.m"; path = "Nocilla/Categories/NSData+Nocilla.m"; sourceTree = ""; }; 2684360A9E22977194A9F7BAC3580666 /* AdapterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AdapterProtocols.swift; path = Sources/Nimble/Adapters/AdapterProtocols.swift; sourceTree = ""; }; 2767B46482B0569CB7A3D8A5171E1481 /* Quick-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Quick-dummy.m"; sourceTree = ""; }; + 2968311D6DF69E6F64E0B003853A1588 /* Pods-AstroTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-AstroTests-umbrella.h"; sourceTree = ""; }; 29DB305A733900DA8BE91E99DA1F6678 /* SwiftTask-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftTask-dummy.m"; sourceTree = ""; }; 2A355A0E9474F123020DFB6D08415B7E /* World+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "World+DSL.swift"; path = "Sources/Quick/DSL/World+DSL.swift"; sourceTree = ""; }; + 2B5702560A020F3507BFBC62776005EF /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Alamofire.modulemap; sourceTree = ""; }; 2E5570E2270E74080439F093AE77AF01 /* NSURLRequest+DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLRequest+DSL.h"; path = "Nocilla/Hooks/NSURLRequest/NSURLRequest+DSL.h"; sourceTree = ""; }; - 2E71D1C2D2314E373416420A365F7368 /* Pods-AstroTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-AstroTests-acknowledgements.plist"; sourceTree = ""; }; 2F9A86574F2A7071B2058EF9649F9F4F /* AllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AllPass.swift; path = Sources/Nimble/Matchers/AllPass.swift; sourceTree = ""; }; 2FCAC907B638BCDE89FBC4E26D1542AF /* Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-prefix.pch"; sourceTree = ""; }; 300B0279FE72478F7D093954D773B4DC /* SwiftTask-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftTask-prefix.pch"; sourceTree = ""; }; 305F507D0BC868E0EFA0E492C50BB344 /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Sources/Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; - 319D9FDE3866087FCB8646FCAFEA909D /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; 327D1EF3F0D47051C002D2C9724D5581 /* HTTPStatusCode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HTTPStatusCode.swift; sourceTree = ""; }; - 32F951BB01951EDE7DBBC6FC707493C6 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; 334E9C3CECC5351EE96F55569E1FCEDD /* XCTestObservationCenter+Register.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestObservationCenter+Register.m"; path = "Sources/Nimble/Adapters/ObjectiveC/XCTestObservationCenter+Register.m"; sourceTree = ""; }; 34E7DEA475E58F139AD7A9775C450E8F /* LSHTTPResponse.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPResponse.h; path = Nocilla/Model/LSHTTPResponse.h; sourceTree = ""; }; 35BD3EF4780C95F238BF55A79833BFFC /* UICollectionView+AstroGadgets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UICollectionView+AstroGadgets.swift"; sourceTree = ""; }; 368ABCA024EEAE1AF88A306FFE3B6E86 /* JSONDecodable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONDecodable.swift; path = Sources/JSONDecodable.swift; sourceTree = ""; }; 377FF62898B9F233DAEAC2A03F7ED71F /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Sources/Quick/ExampleMetadata.swift; sourceTree = ""; }; 396035A274BE85E2A79A14557F188DE9 /* AsyncMatcherWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncMatcherWrapper.swift; path = Sources/Nimble/Matchers/AsyncMatcherWrapper.swift; sourceTree = ""; }; - 3A53526BFF3C6D5B366DA4066B49DD74 /* Pods-Astro.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-Astro.modulemap"; sourceTree = ""; }; 3AA005D7A247CDFA9BFAE4F33F1950A4 /* Example.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Example.swift; path = Sources/Quick/Example.swift; sourceTree = ""; }; 3CE296A8C853B548D6A84BD8B5CFB0E8 /* LSStubRequest.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSStubRequest.h; path = Nocilla/Stubs/LSStubRequest.h; sourceTree = ""; }; 3D0153C0D9E5372AD43FC81C52526302 /* NMBExpectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBExpectation.swift; path = Sources/Nimble/Adapters/ObjectiveC/NMBExpectation.swift; sourceTree = ""; }; 3EF364BB6F5D1DB9851B6BFC10060F2F /* _StateMachine.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = _StateMachine.swift; path = SwiftTask/_StateMachine.swift; sourceTree = ""; }; 4029957B3F8655025D5D20920ED34752 /* Nimble.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nimble.h; path = Sources/Nimble/Nimble.h; sourceTree = ""; }; - 4046EBF9B062ED9B23FAB96D07561CA0 /* Pods-Astro-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Astro-umbrella.h"; sourceTree = ""; }; - 40533FF767EB585B3433B67FB9C5BC77 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; 40766F0C467159B985AA2723FF099609 /* Log.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Log.swift; sourceTree = ""; }; - 410C6A2BACECF4513F82EA7EBC0D1BFB /* Pods-Astro-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Astro-acknowledgements.plist"; sourceTree = ""; }; 419B8EC230B0AF8A2877C52EDD18C518 /* LSStubResponse.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSStubResponse.m; path = Nocilla/Stubs/LSStubResponse.m; sourceTree = ""; }; 41D136DE7AD7FCE83428ECEF04EDC1F7 /* Freddy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Freddy.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 475A05A4D234AEB496174CD3ECE69914 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; 489CA6D4A92715860DCDDFDB61B71884 /* LSASIHTTPRequestAdapter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSASIHTTPRequestAdapter.m; path = Nocilla/Hooks/ASIHTTPRequest/LSASIHTTPRequestAdapter.m; sourceTree = ""; }; 48B28117F0E4929218975EBCD7755CD8 /* Freddy-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Freddy-prefix.pch"; sourceTree = ""; }; + 4997DBF40D15DC61455083F9414614A8 /* Pods-AstroTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-AstroTests-dummy.m"; sourceTree = ""; }; 49C52E23E4263893DB7947504A16DF2C /* JSONParser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONParser.swift; path = Sources/JSONParser.swift; sourceTree = ""; }; - 4B41E2C6F9BDDB8E500A76ACD24DC2A6 /* Pods-AstroTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-AstroTests.release.xcconfig"; sourceTree = ""; }; + 4A481A909D77FF7E93DD19C841760A26 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 4BE2DE3A06C049929FED7B6EA5BD77C1 /* JSONSubscripting.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONSubscripting.swift; path = Sources/JSONSubscripting.swift; sourceTree = ""; }; 4BF2D557873185C73BE025D1BBE21A10 /* Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-umbrella.h"; sourceTree = ""; }; @@ -391,7 +411,9 @@ 4F9C1070A7DA056DC96366DD7AB5D032 /* KeychainAccess.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = KeychainAccess.swift; sourceTree = ""; }; 5005FBED4883E5ECB521DFF686AF8E4E /* LSStubRequestDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSStubRequestDSL.m; path = Nocilla/DSL/LSStubRequestDSL.m; sourceTree = ""; }; 5022140F377B8260DCB428BF0F20E52C /* LSNocilla.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSNocilla.m; path = Nocilla/LSNocilla.m; sourceTree = ""; }; + 512114DC23E7E8EE7A0AF19D564A8039 /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; 5130E6C4B0648E65F27B4B60E917F4D9 /* Astro.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Astro.modulemap; sourceTree = ""; }; + 51D68EE622CCBC2517A7E3842815620D /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; 52371319E2C73E2815BF88ED9A42E25F /* Nimble-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nimble-dummy.m"; sourceTree = ""; }; 5354576D7F0C0BE772A0B0DB707D9FD9 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53A987C36D5AF811928370956EDA6F7B /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Sources/Nimble/Adapters/ObjectiveC/DSL.m; sourceTree = ""; }; @@ -399,42 +421,39 @@ 54509D781D6C2DA65347973554D03C73 /* Quick.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.xcconfig; sourceTree = ""; }; 546BBA0E106E3A9EF12D5EE0C95B0462 /* LSRegexMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSRegexMatcher.m; path = Nocilla/Matchers/LSRegexMatcher.m; sourceTree = ""; }; 550E4A859435509BAB6638D3E05ED846 /* World.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = World.h; path = Sources/Quick/World.h; sourceTree = ""; }; + 55E31E2F9FA8BECABC6F58AD57B2EBC8 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57F88C7E49227690DB30C290A9CEADBF /* SourceLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SourceLocation.swift; path = Sources/Nimble/Utils/SourceLocation.swift; sourceTree = ""; }; 58FC63C8CBFD7E521F24241853DF5C14 /* _RecursiveLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = _RecursiveLock.swift; path = SwiftTask/_RecursiveLock.swift; sourceTree = ""; }; 5990DDE7DB7FAD5BF27CAC2D99935E28 /* LSNSURLHook.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSNSURLHook.h; path = Nocilla/Hooks/NSURLRequest/LSNSURLHook.h; sourceTree = ""; }; 59A8DB2950CDF625EDB83CE63F46A6F6 /* LSNocilla.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSNocilla.h; path = Nocilla/LSNocilla.h; sourceTree = ""; }; - 5A31C32B204D02D4C7C690D920E63CCD /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; + 5A83BCB83F2572A3251B13551F69A138 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; 5B337EA4DB32DBBF01A45AD2DA159EEB /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Nimble/Utils/Async.swift; sourceTree = ""; }; - 5B9479BA6CA341455D32AC3F2A470434 /* Pods-AstroTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-AstroTests-frameworks.sh"; sourceTree = ""; }; - 5CB1530548D1D9E85E0CA807FE68F4B5 /* Pods-AstroTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-AstroTests-dummy.m"; sourceTree = ""; }; 5D1F363DAC6ADA834FD28B2BA055E4F7 /* LSMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSMatcher.m; path = Nocilla/Matchers/LSMatcher.m; sourceTree = ""; }; + 5E5DE73C1E1F70D7DECB931C65A67679 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; 5F16FD68893A2ED451E86E1599F8FC16 /* LSDataMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSDataMatcher.h; path = Nocilla/Matchers/LSDataMatcher.h; sourceTree = ""; }; 5FD76D017AEEF056A8FC7A05D8562C2D /* XCTestSuite+QuickTestSuiteBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestSuite+QuickTestSuiteBuilder.m"; path = "Sources/Quick/XCTestSuite+QuickTestSuiteBuilder.m"; sourceTree = ""; }; 612F5B7DAD9D03A91ED5FC2A20417E03 /* NSData+Nocilla.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSData+Nocilla.h"; path = "Nocilla/Categories/NSData+Nocilla.h"; sourceTree = ""; }; 6496FB4F8515747A0F9E50DC22B36E11 /* NMBObjCMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBObjCMatcher.swift; path = Sources/Nimble/Adapters/ObjectiveC/NMBObjCMatcher.swift; sourceTree = ""; }; - 65F85A4BB288510912A1612AEB7FF0F5 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; - 6802180060568B48E5AA39180D643845 /* Pods-Astro.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Astro.debug.xcconfig"; sourceTree = ""; }; 6998EC154F33D892A19AA8FD5E914E03 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 6A2033086B25E850845B6A7EF6B59A56 /* DSL+Wait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Wait.swift"; path = "Sources/Nimble/DSL+Wait.swift"; sourceTree = ""; }; 6A44E47EFD289B10910E4FDA903A2E9F /* UIView+AstroGadgets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+AstroGadgets.swift"; sourceTree = ""; }; - 6A48017A94FCEF5694E75BD283E6D2C4 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 6ABDA7E71C2F0EA181105310A6FC9F60 /* LSStubResponseDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSStubResponseDSL.m; path = Nocilla/DSL/LSStubResponseDSL.m; sourceTree = ""; }; + 6B4BE48F7C4B52024AA898C9C47426F5 /* Pods-Astro.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Astro.debug.xcconfig"; sourceTree = ""; }; 6B67C20266A4C50A1C347EA85C1B8814 /* BeVoid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeVoid.swift; path = Sources/Nimble/Matchers/BeVoid.swift; sourceTree = ""; }; 6B9BB65FFA5699B6F2A3494430B04909 /* LSDataMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSDataMatcher.m; path = Nocilla/Matchers/LSDataMatcher.m; sourceTree = ""; }; 6BCA294AF3615B183F578E3E71D213E3 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 6C2C94ED0D97068FC1CCAFB424107CBF /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Sources/Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; 6C3BAC8C7B9A07799DE46B602D115B02 /* SwiftTask.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SwiftTask.h; path = SwiftTask/SwiftTask.h; sourceTree = ""; }; - 6CA7B27079A3AE437FFB717B6CEB7766 /* Pods-Astro-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Astro-dummy.m"; sourceTree = ""; }; - 6CF4E2387106F9611DD108F7757030E3 /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; + 6DF25ABEEAE287B7BAF35696B5ABBB4F /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; 6F781DA3105FD0D4D698C91B2303DE66 /* LSNSURLHook.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSNSURLHook.m; path = Nocilla/Hooks/NSURLRequest/LSNSURLHook.m; sourceTree = ""; }; + 6FA8866188D58E727285A4F69385A638 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; + 71210D5DF69D2929A31C664FA566777D /* Pods-AstroTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-AstroTests-acknowledgements.plist"; sourceTree = ""; }; 72C14B4911E5A56CEF192041CD902F42 /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Sources/Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; - 73280D5446213683E79903637BE80ED2 /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; 73C18D240C638526F78D36934DAA00DC /* LSHTTPRequestDiff.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPRequestDiff.h; path = Nocilla/Diff/LSHTTPRequestDiff.h; sourceTree = ""; }; 748EA67BCFF48DE8E76C6F13965EE8E6 /* Astro.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Astro.xcconfig; sourceTree = ""; }; 75556B87747C12614320AAF5CB884BEF /* NMBExceptionCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBExceptionCapture.m; path = Sources/Nimble/Adapters/ObjectiveC/NMBExceptionCapture.m; sourceTree = ""; }; 75B4742BC7EE5F35B53FF4C55C5E6B64 /* LSHTTPRequestDSLRepresentation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPRequestDSLRepresentation.h; path = Nocilla/DSL/LSHTTPRequestDSLRepresentation.h; sourceTree = ""; }; 764D110FFFCD4147FAB007F5CC15C39E /* NMBExceptionCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBExceptionCapture.h; path = Sources/Nimble/Adapters/ObjectiveC/NMBExceptionCapture.h; sourceTree = ""; }; - 76DD0C8AD3CA6FE3EF9CDD22B45DECB3 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Alamofire.modulemap; sourceTree = ""; }; 7743BBD05243D52E271CDAD63F5B989A /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAnyOf.swift; path = Sources/Nimble/Matchers/SatisfyAnyOf.swift; sourceTree = ""; }; 77F6A5367DD6585F38FE4EAE6E016F14 /* LSStubResponseDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSStubResponseDSL.h; path = Nocilla/DSL/LSStubResponseDSL.h; sourceTree = ""; }; 78D81935F9929A6DFE89C95A30163613 /* _Atomic.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = _Atomic.swift; path = SwiftTask/_Atomic.swift; sourceTree = ""; }; @@ -451,7 +470,10 @@ 80FFBF4F48BE6A503B8C04F7EE392ED1 /* EndWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EndWith.swift; path = Sources/Nimble/Matchers/EndWith.swift; sourceTree = ""; }; 81B287AAADD69D3417422AE070927E44 /* SwiftTask.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftTask.swift; path = SwiftTask/SwiftTask.swift; sourceTree = ""; }; 82B9AF145DEC704D066D60237E7CBDBB /* LSMatcheable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSMatcheable.h; path = Nocilla/Matchers/LSMatcheable.h; sourceTree = ""; }; + 846E1484C4DB60242A6128EEC54F4CB4 /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; 8499C88CD54A0B131F08D126D46C7B9E /* Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-umbrella.h"; sourceTree = ""; }; + 8605659EDD36D55482C9DB2EBE1A8A33 /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; + 86733F83B392C1F5326987584F7894EA /* Pods-Astro-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Astro-acknowledgements.plist"; sourceTree = ""; }; 877BF995E72F2E8878B207A8C0E9D3D3 /* ReusableView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReusableView.swift; sourceTree = ""; }; 87A7B61AC940A1FD19E52AE798DB0361 /* Match.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Match.swift; path = Sources/Nimble/Matchers/Match.swift; sourceTree = ""; }; 8BEAFEE666D85EA288AF1A32B5F69FAF /* ErrorUtility.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ErrorUtility.swift; path = Sources/Quick/ErrorUtility.swift; sourceTree = ""; }; @@ -461,7 +483,6 @@ 8FFD28BC7177BDC4BB2FC768DF2682AF /* Nocilla.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nocilla.xcconfig; sourceTree = ""; }; 9012B52BD1D693879482A5B36C189E9A /* World+DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "World+DSL.h"; path = "Sources/Quick/DSL/World+DSL.h"; sourceTree = ""; }; 90458BEF3622BBC8AA13B41F18337D64 /* SwiftTask-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftTask-umbrella.h"; sourceTree = ""; }; - 90E4454C234D06CEE4D0A96E4648F68F /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 9108B9F77C510C7B00290542C62100BA /* LSStubResponse.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSStubResponse.h; path = Nocilla/Stubs/LSStubResponse.h; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 94914DECE29A7AF99992E91B0D97AA9B /* LSRegexMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSRegexMatcher.h; path = Nocilla/Matchers/LSRegexMatcher.h; sourceTree = ""; }; @@ -469,21 +490,24 @@ 964D61122C046B2ED058B18F3E45CD99 /* BeLogical.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLogical.swift; path = Sources/Nimble/Matchers/BeLogical.swift; sourceTree = ""; }; 978B87B6A0E09CFE16BB8AFDF35C7524 /* Astro.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Astro.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 981C0D8B96C81FA46A629CACA3982AD6 /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Sources/Nimble/Matchers/BeNil.swift; sourceTree = ""; }; - 99129671E3ADC080472BC0BB32EBB585 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; - 9AA1D1F085FBA836D99BB30907F537F7 /* Pods-Astro-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Astro-frameworks.sh"; sourceTree = ""; }; + 99B26536B75CF50E75382CF77F5F68B4 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; + 9A84B567667740EA1C67D0C60C243975 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; 9B831039D667484298E44CC97352C424 /* MatcherFunc.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherFunc.swift; path = Sources/Nimble/Matchers/MatcherFunc.swift; sourceTree = ""; }; 9BD5AAB63C0A5D8E5DC6EE658F519C3E /* NSRegularExpression+Matcheable.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSRegularExpression+Matcheable.m"; path = "Nocilla/Matchers/NSRegularExpression+Matcheable.m"; sourceTree = ""; }; + 9CDEDE7362828202DA806B38A6851006 /* Pods-Astro-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Astro-acknowledgements.markdown"; sourceTree = ""; }; + 9D4391E606927C6363300EA5AB52A14E /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 9DF421BBCDC5566E84F21FCB2FD3C914 /* NSRegularExpression+Matcheable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSRegularExpression+Matcheable.h"; path = "Nocilla/Matchers/NSRegularExpression+Matcheable.h"; sourceTree = ""; }; 9EA1CA9ABF02F7181B62A14C63C5E3E6 /* Nocilla.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Nocilla.modulemap; sourceTree = ""; }; A0D3979768B49843A07A2D912E671C1B /* NimbleXCTestHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleXCTestHandler.swift; path = Sources/Nimble/Adapters/NimbleXCTestHandler.swift; sourceTree = ""; }; - A22E256F88A3E352A2DC4C81AC6067DD /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; A49E53C084F80BE60CCD84F9475612BF /* LSASIHTTPRequestAdapter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSASIHTTPRequestAdapter.h; path = Nocilla/Hooks/ASIHTTPRequest/LSASIHTTPRequestAdapter.h; sourceTree = ""; }; A5D2CCF46E1B0888E24EB6F6B0E532B2 /* ThrowError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowError.swift; path = Sources/Nimble/Matchers/ThrowError.swift; sourceTree = ""; }; + A6400E50E54416E65C9CC894AE6EA6F5 /* Pods-AstroTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-AstroTests.debug.xcconfig"; sourceTree = ""; }; A651FAABB8A4D3C1B0C9EF7C6EEFE8BC /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Sources/Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; A7976230AA3F6FF83457AAFFCC39F987 /* NSURLRequest+LSHTTPRequest.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLRequest+LSHTTPRequest.h"; path = "Nocilla/Hooks/NSURLRequest/NSURLRequest+LSHTTPRequest.h"; sourceTree = ""; }; AB517BF9DAFFCA1BBCC5A0BBCB5B1A73 /* Queue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Queue.swift; sourceTree = ""; }; AD2511DF7B5065EB4197A4B475803F14 /* Freddy-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Freddy-umbrella.h"; sourceTree = ""; }; AD7D87EC77CCE2F8C0B6D5BD0C78F808 /* Astro-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Astro-umbrella.h"; sourceTree = ""; }; + ADED1DCB14A4876F2717EF125915C71C /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; B0AD6D8DFD5E95FE41BC3449E756D606 /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Quick.modulemap; sourceTree = ""; }; B175E85AD5037C0096B0195D51B93034 /* LSHTTPRequest.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPRequest.h; path = Nocilla/Model/LSHTTPRequest.h; sourceTree = ""; }; B1E3046BF9FB565B47238131ADA779CE /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Sources/Nimble/Matchers/Equal.swift; sourceTree = ""; }; @@ -494,7 +518,10 @@ BA18B1B763EDA6EBEFF2B9002A0B4538 /* NSString+QCKSelectorName.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+QCKSelectorName.h"; path = "Sources/Quick/NSString+QCKSelectorName.h"; sourceTree = ""; }; BA3DC2ADF554F5AA1C3D8026782FCDD6 /* Nocilla.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Nocilla.framework; sourceTree = BUILT_PRODUCTS_DIR; }; BA6AF301972A52D836E479EF9F1FF7C6 /* NSURLRequest+DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLRequest+DSL.m"; path = "Nocilla/Hooks/NSURLRequest/NSURLRequest+DSL.m"; sourceTree = ""; }; + BAA9EB5EB157F9A95F8CA32853B5297A /* Pods-AstroTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-AstroTests.modulemap"; sourceTree = ""; }; BC2FBAEA7B0E5E601D62EF9567B9A1D3 /* LSNSURLSessionHook.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSNSURLSessionHook.m; path = Nocilla/Hooks/NSURLSession/LSNSURLSessionHook.m; sourceTree = ""; }; + BC5AC734889E8683DD50A1C886C6A720 /* Pods-AstroTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-AstroTests.release.xcconfig"; sourceTree = ""; }; + BCEEAE40220F26BD4F12EF5023D7A27A /* Pods-Astro-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Astro-resources.sh"; sourceTree = ""; }; BE458D803D42A46517B26B09327987D1 /* LayoutLabel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LayoutLabel.swift; sourceTree = ""; }; BECF439ED63F91CEA1E08C23AAE18336 /* PostNotification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PostNotification.swift; path = Sources/Nimble/Matchers/PostNotification.swift; sourceTree = ""; }; BFC88CB4D2A5E653FE76097D9DCAEA4B /* Freddy-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Freddy-dummy.m"; sourceTree = ""; }; @@ -502,23 +529,25 @@ C110C237F252435D4A36AFB2FBC9847C /* Contain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Contain.swift; path = Sources/Nimble/Matchers/Contain.swift; sourceTree = ""; }; C1BECFF57B794BF840211E16075E843B /* UITableView+AstroGadgets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UITableView+AstroGadgets.swift"; sourceTree = ""; }; C1D362BF523A9A5F5597677017D9479B /* Closures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Closures.swift; path = Sources/Quick/Hooks/Closures.swift; sourceTree = ""; }; + C37E4B7AD3DFF48E94B070DA3034FAF5 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; C4A303959AA23940B44A630C103DD53B /* SwiftTask.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftTask.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C653AAEBCA9E9BA0A57EB9B1CCCE3BAC /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; C662FFC3C402F839DE09A67255100AA2 /* NimbleEnvironment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleEnvironment.swift; path = Sources/Nimble/Adapters/NimbleEnvironment.swift; sourceTree = ""; }; + CA13E6763DFBF5B5D1943920BE89D610 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; + CA287004F6A3A6417DCAA1D18E5C5BA4 /* Pods-Astro.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Astro.release.xcconfig"; sourceTree = ""; }; CB1DDBDCCC983F8C7DBAE01E30388C2D /* NMBStringify.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBStringify.h; path = Sources/Nimble/Adapters/ObjectiveC/NMBStringify.h; sourceTree = ""; }; - CD60EA3B4AA4B9F19346C586E4705D37 /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; CDF5736D9D7A92F8E27A62AEF194A5D3 /* Nocilla.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nocilla.h; path = Nocilla/Nocilla.h; sourceTree = ""; }; CE8D6AF0AB4648D7505A7E1708DC6955 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D04E964F3DB35CE6A55222A2A22E06CA /* DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DSL.h; path = Sources/Nimble/Adapters/ObjectiveC/DSL.h; sourceTree = ""; }; D057E3DA74D706A5230C38A2A8DA23BA /* NSString+Nocilla.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+Nocilla.h"; path = "Nocilla/Categories/NSString+Nocilla.h"; sourceTree = ""; }; D1F318A61A9ABA6904BC70BCB14E8965 /* Freddy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Freddy.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D29BCABEA6BBEBF1CFD4012121C0264B /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; D39098627F8A63B173221DD4453E1816 /* LSHTTPClientHook.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPClientHook.h; path = Nocilla/Hooks/LSHTTPClientHook.h; sourceTree = ""; }; - D4B7C333666D8E4ED3351DDC9C538FEB /* Upload.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Upload.swift; path = Source/Upload.swift; sourceTree = ""; }; + D478996036C1B8667C7EC683C038F598 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; D5346D1563A1A298C988CF5F943C093A /* AssertionDispatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionDispatcher.swift; path = Sources/Nimble/Adapters/AssertionDispatcher.swift; sourceTree = ""; }; D5663CF2A9C80609B52068DAB5F86C8E /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Sources/Quick/DSL/QCKDSL.m; sourceTree = ""; }; D599F054E4FE2159DEF282CBE0E31DFA /* LSStubRequestDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSStubRequestDSL.h; path = Nocilla/DSL/LSStubRequestDSL.h; sourceTree = ""; }; D62BB50E8E9E3730D17977D8D21E7D3E /* NetworkService.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NetworkService.swift; sourceTree = ""; }; - D731BEB44F07F8750E7A220ECD34E71F /* Stream.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stream.swift; path = Source/Stream.swift; sourceTree = ""; }; D7E2DFFAF9C53B8870CECB5F7F64089D /* LSNSURLSessionHook.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSNSURLSessionHook.h; path = Nocilla/Hooks/NSURLSession/LSNSURLSessionHook.h; sourceTree = ""; }; D7F5275B4193E841C3997C48E6EFE373 /* BeAKindOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAKindOf.swift; path = Sources/Nimble/Matchers/BeAKindOf.swift; sourceTree = ""; }; D97CC484A2DBEFEC771C1025EBC41CCE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; @@ -527,27 +556,23 @@ DD52F0E3E4688A2CE0A07E04DA911577 /* CurrentTestCaseTracker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CurrentTestCaseTracker.h; path = Sources/Nimble/Adapters/ObjectiveC/CurrentTestCaseTracker.h; sourceTree = ""; }; DF1351BCB4B31A4D1E8A625409BDF310 /* JSONSerializing.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONSerializing.swift; path = Sources/JSONSerializing.swift; sourceTree = ""; }; E19A03D34F45F64F617E816C9EFB0D92 /* JSONLiteralConvertible.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONLiteralConvertible.swift; path = Sources/JSONLiteralConvertible.swift; sourceTree = ""; }; + E2FDBBD7A1FA9E8D7313E2D8C7CB1083 /* Pods-AstroTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-AstroTests-acknowledgements.markdown"; sourceTree = ""; }; E3B021591B3A1EAA8BCA339C18A3E219 /* HaveCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HaveCount.swift; path = Sources/Nimble/Matchers/HaveCount.swift; sourceTree = ""; }; - E3B4638026BD3B6BBB9EF7535E899EF5 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; E3C934F55950F055755F2FB5E331DA9B /* SwiftTask.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftTask.xcconfig; sourceTree = ""; }; E3D5F8E522B317FBBEBB08F1E2BF775F /* JSONParsing.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONParsing.swift; path = Sources/JSONParsing.swift; sourceTree = ""; }; E408DAA6184E7EAB179A403F5D1274DA /* NetworkServiceLogger.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NetworkServiceLogger.swift; sourceTree = ""; }; E4D54383DE9F48DD36B48F77E57BF01E /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; + E542258439D60CFDE6C1F7CBFB9C9D53 /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; E54303E2686DF60500CC0A595F9B66D0 /* Stringers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stringers.swift; path = Sources/Nimble/Utils/Stringers.swift; sourceTree = ""; }; E5C600D0851A3EFA2A461D6559885924 /* Freddy.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Freddy.xcconfig; sourceTree = ""; }; E64F5CCF316D56E2C07425CC0D9DCB90 /* NSString+Matcheable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+Matcheable.h"; path = "Nocilla/Matchers/NSString+Matcheable.h"; sourceTree = ""; }; E67AD8E1BA3D5AE433588B5D864123CA /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Sources/Quick/Configuration/QuickConfiguration.h; sourceTree = ""; }; - E6B2DBA6A0515637450DCF30D86FE191 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; - E764963DD2E875F513366A19344714B6 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - E95A97D962711156B3B673A517C02090 /* Pods-Astro-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Astro-acknowledgements.markdown"; sourceTree = ""; }; - E9D00D8B2A0D78B2B486894AD785D781 /* Pods-AstroTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-AstroTests-acknowledgements.markdown"; sourceTree = ""; }; EC674E21556741A41DAFF6F06A257444 /* String+FileName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+FileName.swift"; path = "Sources/Quick/String+FileName.swift"; sourceTree = ""; }; EC68F3FFC9D47A8F658D2289435BE266 /* LSStubRequest.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSStubRequest.m; path = Nocilla/Stubs/LSStubRequest.m; sourceTree = ""; }; EE7F05482CE22FA4A2F9709C72C29F2F /* Nocilla-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nocilla-prefix.pch"; sourceTree = ""; }; + EE8F0CC5B62EC037D08D2A44AA5CABBA /* Pods-AstroTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-AstroTests-resources.sh"; sourceTree = ""; }; EEF30250E18C7F3BC7A5DC0599B4CC6B /* NSString+Matcheable.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+Matcheable.m"; path = "Nocilla/Matchers/NSString+Matcheable.m"; sourceTree = ""; }; - EFCF05EC1DA60395794F91AEBC1D4A73 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; EFDC167F51D907DA3C0BB648440C27F7 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Quick/DSL/DSL.swift; sourceTree = ""; }; - F1012B82C8E2EB174EC08743BCE9146E /* Pods-AstroTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-AstroTests-umbrella.h"; sourceTree = ""; }; F1A19438A8C71AB3785FC2728ACF7D35 /* LSStringMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSStringMatcher.h; path = Nocilla/Matchers/LSStringMatcher.h; sourceTree = ""; }; F2A3A410983B0ACAC5571383B99CAB2D /* Nocilla-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nocilla-dummy.m"; sourceTree = ""; }; F2B3E7999D62C38A0ADE7FC63494B885 /* SuiteHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SuiteHooks.swift; path = Sources/Quick/Hooks/SuiteHooks.swift; sourceTree = ""; }; @@ -556,15 +581,17 @@ F313245E710FF08DD42E94F62560C21A /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickSelectedTestSuiteBuilder.swift; path = Sources/Quick/QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; F511D0AF6267ABF4691C1EDE99FB659D /* EnumCountable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EnumCountable.swift; sourceTree = ""; }; F5395BBA7A071CBF3AFE75B515C61368 /* BeCloseTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeCloseTo.swift; path = Sources/Nimble/Matchers/BeCloseTo.swift; sourceTree = ""; }; + F6190D3DCC555A20AEBF4FE28A41C942 /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; F63BB0F4518DCE933B9046B940D5A9B1 /* LSStringMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSStringMatcher.m; path = Nocilla/Matchers/LSStringMatcher.m; sourceTree = ""; }; - F63DCD4CFAFE4F7967822B5A4D971100 /* Pods-AstroTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-AstroTests.debug.xcconfig"; sourceTree = ""; }; - F85639431E17CBB60BF656426BB168D6 /* Download.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Download.swift; path = Source/Download.swift; sourceTree = ""; }; F89A3E458EC43DC935269FB7DD771D86 /* Pods_AstroTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AstroTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F952371ED40FD33BA4B9D7AE9F6420AF /* Freddy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Freddy.h; path = Sources/Freddy.h; sourceTree = ""; }; FAA131598253CE58BF21F626715CEF42 /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Sources/Nimble/FailureMessage.swift; sourceTree = ""; }; + FC4B28D110AB0D170E2F97D415B8E6E9 /* Pods-Astro-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Astro-dummy.m"; sourceTree = ""; }; + FCA00C1B06719055DFF92DF876BB1CB6 /* Pods-Astro.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-Astro.modulemap"; sourceTree = ""; }; FCE3C6A2429004B3D14090204CC6CC53 /* Nimble.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; FDD291DBB3F60DEB32D3F9C5F08524ED /* UIColor+AstroGadgets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIColor+AstroGadgets.swift"; sourceTree = ""; }; FDE84FF0D7B9663C062BD966122BCA44 /* SwiftTask.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftTask.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FE41FE08DA43BEAD289E4EED605F0730 /* Pods-AstroTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-AstroTests-frameworks.sh"; sourceTree = ""; }; FED3C10BB4D401609B8331544CF4494B /* LSASIHTTPRequestHook.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSASIHTTPRequestHook.h; path = Nocilla/Hooks/ASIHTTPRequest/LSASIHTTPRequestHook.h; sourceTree = ""; }; FEE475B600741EFE0262B7D1DCC75083 /* MatchError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatchError.swift; path = Sources/Nimble/Matchers/MatchError.swift; sourceTree = ""; }; FF14E7E64D23B07812BAF0C10D193605 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -588,15 +615,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 21B8AC554E0DA6E686465542DD732B35 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 73000FB0D08D09BCAFF0052F746E2749 /* Foundation.framework in Frameworks */, - CAFBD098436FD07E8838B47730DCF021 /* XCTest.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 2599355ED41A3DE716D0FE7B560FB052 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -609,6 +627,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 56851A6816A60DD5B20659636746C109 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3D8752CE38A3F42C824F6C25BEF128BD /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 5F40817F9BD61376555E224A54C77911 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -634,19 +660,20 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - EF3667FA57CD77DDC5AF188B588D6C69 /* Frameworks */ = { + E52D4CD1A7CBBC3D9408F615E61C1153 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 8930AA77E598E0DB79F1376627A2BFE1 /* Foundation.framework in Frameworks */, + ED1BA82935766174DD32423269DFAF7F /* Foundation.framework in Frameworks */, + E1A024733661B5738EE3884FB7AB4984 /* XCTest.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - F7A69B59BD2D2E33F10C1DAB631CC926 /* Frameworks */ = { + EF3667FA57CD77DDC5AF188B588D6C69 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A8F7B821E99BED8460534AD85FD1F269 /* Foundation.framework in Frameworks */, + 8930AA77E598E0DB79F1376627A2BFE1 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -692,7 +719,7 @@ 1ABE14C1EB7548408290F060B1FD6F68 /* Pods */ = { isa = PBXGroup; children = ( - 3C25D5870F83C9A07244C4E3147C8ABB /* Alamofire */, + D867CD60D15C30C7027114087265AB6C /* Alamofire */, 41700AC12E751F80A5A2A7E6FBE11341 /* Freddy */, 228647CEE3FEA868B8EA7DF5D4193883 /* Nimble */, 7A612BB7D2167E755F0F6802D5B0935A /* Nocilla */, @@ -702,6 +729,15 @@ name = Pods; sourceTree = ""; }; + 1C28C13A1BB5272BFE90AFD378132CDE /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 75BADEDB5FE956D27182473A1A05132C /* Pods-Astro */, + FD982DE5B6D1298260BEAE29CC0FCD2A /* Pods-AstroTests */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; 228647CEE3FEA868B8EA7DF5D4193883 /* Nimble */ = { isa = PBXGroup; children = ( @@ -777,31 +813,6 @@ path = ..; sourceTree = ""; }; - 3C25D5870F83C9A07244C4E3147C8ABB /* Alamofire */ = { - isa = PBXGroup; - children = ( - 16052B2D8A55F982B608750D0064FD9E /* Alamofire.swift */, - F85639431E17CBB60BF656426BB168D6 /* Download.swift */, - 2479CF9F42A48561B5CB97BEDF88A0EF /* Error.swift */, - 01D4FCB7E6BA5636A790080020124EFD /* Manager.swift */, - E764963DD2E875F513366A19344714B6 /* MultipartFormData.swift */, - 99129671E3ADC080472BC0BB32EBB585 /* NetworkReachabilityManager.swift */, - 6CF4E2387106F9611DD108F7757030E3 /* Notifications.swift */, - 73280D5446213683E79903637BE80ED2 /* ParameterEncoding.swift */, - 32F951BB01951EDE7DBBC6FC707493C6 /* Request.swift */, - EFCF05EC1DA60395794F91AEBC1D4A73 /* Response.swift */, - 40533FF767EB585B3433B67FB9C5BC77 /* ResponseSerialization.swift */, - E6B2DBA6A0515637450DCF30D86FE191 /* Result.swift */, - 5A31C32B204D02D4C7C690D920E63CCD /* ServerTrustPolicy.swift */, - D731BEB44F07F8750E7A220ECD34E71F /* Stream.swift */, - A22E256F88A3E352A2DC4C81AC6067DD /* Timeline.swift */, - D4B7C333666D8E4ED3351DDC9C538FEB /* Upload.swift */, - 65F85A4BB288510912A1612AEB7FF0F5 /* Validation.swift */, - 6C61DBCC5EF136FFB1E6AA991EC7E081 /* Support Files */, - ); - path = Alamofire; - sourceTree = ""; - }; 3F45A6F7E3C1435AE300D1848F2ECF98 /* Astro */ = { isa = PBXGroup; children = ( @@ -874,18 +885,21 @@ name = Security; sourceTree = ""; }; - 6C61DBCC5EF136FFB1E6AA991EC7E081 /* Support Files */ = { + 75BADEDB5FE956D27182473A1A05132C /* Pods-Astro */ = { isa = PBXGroup; children = ( - 76DD0C8AD3CA6FE3EF9CDD22B45DECB3 /* Alamofire.modulemap */, - CD60EA3B4AA4B9F19346C586E4705D37 /* Alamofire.xcconfig */, - 1F13E6F474D0524F6981DA5085B0F5B7 /* Alamofire-dummy.m */, - 319D9FDE3866087FCB8646FCAFEA909D /* Alamofire-prefix.pch */, - E3B4638026BD3B6BBB9EF7535E899EF5 /* Alamofire-umbrella.h */, - 90E4454C234D06CEE4D0A96E4648F68F /* Info.plist */, + 9D4391E606927C6363300EA5AB52A14E /* Info.plist */, + FCA00C1B06719055DFF92DF876BB1CB6 /* Pods-Astro.modulemap */, + 9CDEDE7362828202DA806B38A6851006 /* Pods-Astro-acknowledgements.markdown */, + 86733F83B392C1F5326987584F7894EA /* Pods-Astro-acknowledgements.plist */, + FC4B28D110AB0D170E2F97D415B8E6E9 /* Pods-Astro-dummy.m */, + BCEEAE40220F26BD4F12EF5023D7A27A /* Pods-Astro-resources.sh */, + 01969FDB7BE5215049329E2826518627 /* Pods-Astro-umbrella.h */, + 6B4BE48F7C4B52024AA898C9C47426F5 /* Pods-Astro.debug.xcconfig */, + CA287004F6A3A6417DCAA1D18E5C5BA4 /* Pods-Astro.release.xcconfig */, ); - name = "Support Files"; - path = "../Target Support Files/Alamofire"; + name = "Pods-Astro"; + path = "Target Support Files/Pods-Astro"; sourceTree = ""; }; 7A612BB7D2167E755F0F6802D5B0935A /* Nocilla */ = { @@ -975,7 +989,7 @@ 106194991891EBCB4DDC3E7B69FE5D75 /* Frameworks */, 1ABE14C1EB7548408290F060B1FD6F68 /* Pods */, 7ACA5C36D4C114F9D9BDE8A0220636D6 /* Products */, - 96FA14425713E2D6E893C6DB91BB7FAC /* Targets Support Files */, + 1C28C13A1BB5272BFE90AFD378132CDE /* Targets Support Files */, ); sourceTree = ""; }; @@ -1012,15 +1026,6 @@ name = UI; sourceTree = ""; }; - 96FA14425713E2D6E893C6DB91BB7FAC /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - FAED6ED99000380BF515D69999E019F0 /* Pods-Astro */, - E40524808528E67524E1B4CB66F35588 /* Pods-AstroTests */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; ABDB93E990A91610CA6DCC71E723D7F4 /* Support Files */ = { isa = PBXGroup; children = ( @@ -1106,6 +1111,31 @@ path = Networking; sourceTree = ""; }; + D867CD60D15C30C7027114087265AB6C /* Alamofire */ = { + isa = PBXGroup; + children = ( + F6190D3DCC555A20AEBF4FE28A41C942 /* AFError.swift */, + 5E5DE73C1E1F70D7DECB931C65A67679 /* Alamofire.swift */, + 5A83BCB83F2572A3251B13551F69A138 /* DispatchQueue+Alamofire.swift */, + 9A84B567667740EA1C67D0C60C243975 /* MultipartFormData.swift */, + 475A05A4D234AEB496174CD3ECE69914 /* NetworkReachabilityManager.swift */, + 24AB3FEDC733FF0C724BA4579F65C1CB /* Notifications.swift */, + 6DF25ABEEAE287B7BAF35696B5ABBB4F /* ParameterEncoding.swift */, + 4A481A909D77FF7E93DD19C841760A26 /* Request.swift */, + ADED1DCB14A4876F2717EF125915C71C /* Response.swift */, + D478996036C1B8667C7EC683C038F598 /* ResponseSerialization.swift */, + 16A97930F8C7CD98BB75727908A6CEEF /* Result.swift */, + 51D68EE622CCBC2517A7E3842815620D /* ServerTrustPolicy.swift */, + 1AB54E1DE71B88A7C5744C4262CC89A2 /* SessionDelegate.swift */, + 846E1484C4DB60242A6128EEC54F4CB4 /* SessionManager.swift */, + 8605659EDD36D55482C9DB2EBE1A8A33 /* TaskDelegate.swift */, + 512114DC23E7E8EE7A0AF19D564A8039 /* Timeline.swift */, + CA13E6763DFBF5B5D1943920BE89D610 /* Validation.swift */, + E863F1947DA290DF0E5B4C74C2B42F52 /* Support Files */, + ); + path = Alamofire; + sourceTree = ""; + }; DD6A520257E2DA1470283635103EB06B /* Support Files */ = { isa = PBXGroup; children = ( @@ -1128,24 +1158,6 @@ name = Logging; sourceTree = ""; }; - E40524808528E67524E1B4CB66F35588 /* Pods-AstroTests */ = { - isa = PBXGroup; - children = ( - 6A48017A94FCEF5694E75BD283E6D2C4 /* Info.plist */, - 18894A3E151905AB3BB2BEB1A15E9977 /* Pods-AstroTests.modulemap */, - E9D00D8B2A0D78B2B486894AD785D781 /* Pods-AstroTests-acknowledgements.markdown */, - 2E71D1C2D2314E373416420A365F7368 /* Pods-AstroTests-acknowledgements.plist */, - 5CB1530548D1D9E85E0CA807FE68F4B5 /* Pods-AstroTests-dummy.m */, - 5B9479BA6CA341455D32AC3F2A470434 /* Pods-AstroTests-frameworks.sh */, - 0014D967034D35F957148B768101D8F4 /* Pods-AstroTests-resources.sh */, - F1012B82C8E2EB174EC08743BCE9146E /* Pods-AstroTests-umbrella.h */, - F63DCD4CFAFE4F7967822B5A4D971100 /* Pods-AstroTests.debug.xcconfig */, - 4B41E2C6F9BDDB8E500A76ACD24DC2A6 /* Pods-AstroTests.release.xcconfig */, - ); - name = "Pods-AstroTests"; - path = "Target Support Files/Pods-AstroTests"; - sourceTree = ""; - }; E6444BA9FB1EA93135F627902675CB3D /* UI */ = { isa = PBXGroup; children = ( @@ -1161,6 +1173,20 @@ path = UI; sourceTree = ""; }; + E863F1947DA290DF0E5B4C74C2B42F52 /* Support Files */ = { + isa = PBXGroup; + children = ( + 2B5702560A020F3507BFBC62776005EF /* Alamofire.modulemap */, + D29BCABEA6BBEBF1CFD4012121C0264B /* Alamofire.xcconfig */, + 6FA8866188D58E727285A4F69385A638 /* Alamofire-dummy.m */, + E542258439D60CFDE6C1F7CBFB9C9D53 /* Alamofire-prefix.pch */, + 99B26536B75CF50E75382CF77F5F68B4 /* Alamofire-umbrella.h */, + C37E4B7AD3DFF48E94B070DA3034FAF5 /* Info.plist */, + ); + name = "Support Files"; + path = "../Target Support Files/Alamofire"; + sourceTree = ""; + }; ED92AA562443AF46AF8D8BE3AC4C085B /* Astro */ = { isa = PBXGroup; children = ( @@ -1213,22 +1239,22 @@ path = "../Target Support Files/SwiftTask"; sourceTree = ""; }; - FAED6ED99000380BF515D69999E019F0 /* Pods-Astro */ = { + FD982DE5B6D1298260BEAE29CC0FCD2A /* Pods-AstroTests */ = { isa = PBXGroup; children = ( - 0979C227E7552D43BEF6C85C5E418766 /* Info.plist */, - 3A53526BFF3C6D5B366DA4066B49DD74 /* Pods-Astro.modulemap */, - E95A97D962711156B3B673A517C02090 /* Pods-Astro-acknowledgements.markdown */, - 410C6A2BACECF4513F82EA7EBC0D1BFB /* Pods-Astro-acknowledgements.plist */, - 6CA7B27079A3AE437FFB717B6CEB7766 /* Pods-Astro-dummy.m */, - 9AA1D1F085FBA836D99BB30907F537F7 /* Pods-Astro-frameworks.sh */, - 02C475E83572D471A01BFD104587CDB7 /* Pods-Astro-resources.sh */, - 4046EBF9B062ED9B23FAB96D07561CA0 /* Pods-Astro-umbrella.h */, - 6802180060568B48E5AA39180D643845 /* Pods-Astro.debug.xcconfig */, - 1640764CAB261E1814B1BA7709848F58 /* Pods-Astro.release.xcconfig */, + 55E31E2F9FA8BECABC6F58AD57B2EBC8 /* Info.plist */, + BAA9EB5EB157F9A95F8CA32853B5297A /* Pods-AstroTests.modulemap */, + E2FDBBD7A1FA9E8D7313E2D8C7CB1083 /* Pods-AstroTests-acknowledgements.markdown */, + 71210D5DF69D2929A31C664FA566777D /* Pods-AstroTests-acknowledgements.plist */, + 4997DBF40D15DC61455083F9414614A8 /* Pods-AstroTests-dummy.m */, + FE41FE08DA43BEAD289E4EED605F0730 /* Pods-AstroTests-frameworks.sh */, + EE8F0CC5B62EC037D08D2A44AA5CABBA /* Pods-AstroTests-resources.sh */, + 2968311D6DF69E6F64E0B003853A1588 /* Pods-AstroTests-umbrella.h */, + A6400E50E54416E65C9CC894AE6EA6F5 /* Pods-AstroTests.debug.xcconfig */, + BC5AC734889E8683DD50A1C886C6A720 /* Pods-AstroTests.release.xcconfig */, ); - name = "Pods-Astro"; - path = "Target Support Files/Pods-Astro"; + name = "Pods-AstroTests"; + path = "Target Support Files/Pods-AstroTests"; sourceTree = ""; }; /* End PBXGroup section */ @@ -1281,21 +1307,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 4B93756C8652F7BAFAE950C53F4D5A79 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - FD31EB5C092198491AFA59C0AA80E33F /* NSString+QCKSelectorName.h in Headers */, - 2F2E9CFF89016043EAF1D3885AC7C696 /* QCKDSL.h in Headers */, - 0A56DFB216D6CBFDE7D38CC82A56C714 /* Quick-umbrella.h in Headers */, - 7CF0F6A48A0677DE2908A8D931A99ADC /* Quick.h in Headers */, - 617FB9A348751ECB4250ABA0316403AC /* QuickConfiguration.h in Headers */, - 8F86133FD6D0F537A52D317518115BC5 /* QuickSpec.h in Headers */, - E5257C3F4110DEEA78306240DEB2333F /* World+DSL.h in Headers */, - BE2859F1F4050BADFDDF76A557CF0FE7 /* World.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 4F71E0A16A6747419DAB8EEE7A3352BD /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -1313,19 +1324,19 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9AACBB273ECD8316A57EEEE5E10835F6 /* Headers */ = { + 691441A55E14AD6507F3F1AA48B90FB3 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - E8DC5C8D0C37517C1E9309C63EFED4D0 /* Astro-umbrella.h in Headers */, + F860A14430F1CACDA8DD8D930D9D31C8 /* Pods-AstroTests-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - AB0736636DEF472CEB6CDE0ED67B2528 /* Headers */ = { + 9AACBB273ECD8316A57EEEE5E10835F6 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - F4FB5ED9614E6F9838BC0037675F5010 /* Pods-AstroTests-umbrella.h in Headers */, + E8DC5C8D0C37517C1E9309C63EFED4D0 /* Astro-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1350,6 +1361,21 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + FCE7C4BFA574B2C6FF4B46CA4BB7DD7E /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 63F83D6FFDA4A20864206D5CA7507315 /* NSString+QCKSelectorName.h in Headers */, + 037277A5335F4706D656E27E5DD15D11 /* QCKDSL.h in Headers */, + FB7D8621EE4D6676288245B294022C47 /* Quick-umbrella.h in Headers */, + 270FEEBAE0671C72A82B3CEE2F771E0B /* Quick.h in Headers */, + 073CCD3D1AE9A6857F9DC0CFAA511F6A /* QuickConfiguration.h in Headers */, + A47EF77A104A17550B47ECB220523317 /* QuickSpec.h in Headers */, + 5FD768C424450A19511BA433803546B7 /* World+DSL.h in Headers */, + 8335A65095F73165ACB070AA3BE0973D /* World.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ @@ -1408,7 +1434,7 @@ isa = PBXNativeTarget; buildConfigurationList = 3CFB42910790CF0BDBCCEBAACD6B9367 /* Build configuration list for PBXNativeTarget "Alamofire" */; buildPhases = ( - 5FEED44A5909604CBB444B6BE51B815D /* Sources */, + 02C2F9C45AD5E593D63B224B7BB05F82 /* Sources */, B1729F851F648EC60EE93CDB3C8BAEAD /* Frameworks */, EFDF3B631BBB965A372347705CA14854 /* Headers */, ); @@ -1441,13 +1467,13 @@ productReference = 978B87B6A0E09CFE16BB8AFDF35C7524 /* Astro.framework */; productType = "com.apple.product-type.framework"; }; - A806B96D9DEB1A4DB63C09048B2EF00E /* Quick */ = { + C8DD2CC4E3F108C6E7F9BFEFBBDF393F /* Quick */ = { isa = PBXNativeTarget; - buildConfigurationList = 4655531C845E8D36877301C76982FD46 /* Build configuration list for PBXNativeTarget "Quick" */; + buildConfigurationList = 835D37CFD29374FD1E92E16925314431 /* Build configuration list for PBXNativeTarget "Quick" */; buildPhases = ( - 5A2B024904235D1442DC49E1C77C43F5 /* Sources */, - 21B8AC554E0DA6E686465542DD732B35 /* Frameworks */, - 4B93756C8652F7BAFAE950C53F4D5A79 /* Headers */, + D07A3F92DF973D5C849AB4DDF4F87CA7 /* Sources */, + E52D4CD1A7CBBC3D9408F615E61C1153 /* Frameworks */, + FCE7C4BFA574B2C6FF4B46CA4BB7DD7E /* Headers */, ); buildRules = ( ); @@ -1458,20 +1484,24 @@ productReference = 7A4A3ECEB9A900D640EF1635D4313478 /* Quick.framework */; productType = "com.apple.product-type.framework"; }; - B025A060E6A35B16AB1D07BA4F9DD3DB /* Pods-AstroTests */ = { + CE56E0B4473A81AC796EE3538C555BB1 /* Pods-AstroTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 8F3DD3BC50DF7C47C729F63BC1A9400A /* Build configuration list for PBXNativeTarget "Pods-AstroTests" */; + buildConfigurationList = 73B58F5C5988800360A457890DA7ED9B /* Build configuration list for PBXNativeTarget "Pods-AstroTests" */; buildPhases = ( - 9BDBD44EAD2CFF6A51CC96C708A3EFEA /* Sources */, - F7A69B59BD2D2E33F10C1DAB631CC926 /* Frameworks */, - AB0736636DEF472CEB6CDE0ED67B2528 /* Headers */, + C279AABBC7864B185562DEDA51185511 /* Sources */, + 56851A6816A60DD5B20659636746C109 /* Frameworks */, + 691441A55E14AD6507F3F1AA48B90FB3 /* Headers */, ); buildRules = ( ); dependencies = ( - 8C61511C7F16907EDD83B51428CB689B /* PBXTargetDependency */, - 5A9FBE1476ECAA5F653CEB42C3741EBB /* PBXTargetDependency */, - 63A9FA5468BC49D26EB9EF614CCB0BCB /* PBXTargetDependency */, + FDFEF1AD11325A58B4B227F1102ACD83 /* PBXTargetDependency */, + 6C1DFC770888B6737B495EAE80D19BE1 /* PBXTargetDependency */, + 6A7DEBD1ECA87377F658B32B62B70431 /* PBXTargetDependency */, + DDA097EBB4CBA18A805F41AF62909DD9 /* PBXTargetDependency */, + D880540F35111F661E7290319BD57005 /* PBXTargetDependency */, + C578AC1BBA6DA2F1427BECF9CC8171C8 /* PBXTargetDependency */, + F11FFE9B6672233F413D7D4474FC8256 /* PBXTargetDependency */, ); name = "Pods-AstroTests"; productName = "Pods-AstroTests"; @@ -1524,32 +1554,6 @@ attributes = { LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0700; - TargetAttributes = { - 40FF1C77152F384080A1A02E90A36DA9 = { - LastSwiftMigration = 0800; - }; - 658D059017BAD944D0775434631CF091 = { - LastSwiftMigration = 0800; - }; - 79C040AFDDCE1BCBF6D8B5EB0B85887F = { - LastSwiftMigration = 0800; - }; - 91969E02CD48F26120134D15E489A85C = { - LastSwiftMigration = 0800; - }; - A806B96D9DEB1A4DB63C09048B2EF00E = { - LastSwiftMigration = 0800; - }; - B025A060E6A35B16AB1D07BA4F9DD3DB = { - LastSwiftMigration = 0800; - }; - E693F703278AF18B59BC7B0FDF7B3650 = { - LastSwiftMigration = 0800; - }; - ED668473F669DFBA756C8C69A8DA8ABA = { - LastSwiftMigration = 0800; - }; - }; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -1569,14 +1573,39 @@ 40FF1C77152F384080A1A02E90A36DA9 /* Nimble */, 393E0E1A41299C44C63DBB766A243010 /* Nocilla */, ED668473F669DFBA756C8C69A8DA8ABA /* Pods-Astro */, - B025A060E6A35B16AB1D07BA4F9DD3DB /* Pods-AstroTests */, - A806B96D9DEB1A4DB63C09048B2EF00E /* Quick */, + CE56E0B4473A81AC796EE3538C555BB1 /* Pods-AstroTests */, + C8DD2CC4E3F108C6E7F9BFEFBBDF393F /* Quick */, 658D059017BAD944D0775434631CF091 /* SwiftTask */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ + 02C2F9C45AD5E593D63B224B7BB05F82 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2DE56E9710CC81260C08A20961ACCE6E /* AFError.swift in Sources */, + C29FA5992EF67D6893321BDDC131C54C /* Alamofire-dummy.m in Sources */, + F90CAA20F341B4B5811A6031B7BBA9B5 /* Alamofire.swift in Sources */, + ED4D59B3E02651D2E5C2A0545F7AB611 /* DispatchQueue+Alamofire.swift in Sources */, + 10E5217B88726E3ADF9F527A88A78661 /* MultipartFormData.swift in Sources */, + CDC8E7BC4F6D7941783CA1669F3AEC18 /* NetworkReachabilityManager.swift in Sources */, + 817C1ED23C18514E67277900D668B028 /* Notifications.swift in Sources */, + 1DD2CCAC7B2E2F5BAE6C0199EC87D7C0 /* ParameterEncoding.swift in Sources */, + F253A82332FB27BF37823F9D25B938B4 /* Request.swift in Sources */, + 517677321A634907F92B81A1B04EE27C /* Response.swift in Sources */, + BF25DD2EB63D29FFA2369A4D3DEB6974 /* ResponseSerialization.swift in Sources */, + 9C9F50D58E6F3B5AA5F58598ED7F561C /* Result.swift in Sources */, + 589210F372BC6A8D77D483BD1540D849 /* ServerTrustPolicy.swift in Sources */, + 8E1F57D1096BDAA008D4D0EFEEBCB284 /* SessionDelegate.swift in Sources */, + 7DB5BAB83F6D611D2518C7219D18B16F /* SessionManager.swift in Sources */, + 201D66DFA5AB096795ACF405E47F4FF0 /* TaskDelegate.swift in Sources */, + 28E95AFD51820CD5CF9BB968BAF17DF6 /* Timeline.swift in Sources */, + FC55C32A0B9D387BFD57FCB2E19753BE /* Validation.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 17A9076DD7EA6136F377D49C946ADFEE /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1627,62 +1656,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 5A2B024904235D1442DC49E1C77C43F5 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ABD57ABE0CA2D5E9EDDB246A64C1AD1D /* Callsite.swift in Sources */, - 206541BC9991EE86512D593D96EA83B3 /* Closures.swift in Sources */, - F2096C950FB8A9662DF8BD15AC7E8BBB /* Configuration.swift in Sources */, - 22E176E365EF446AD2ACADC28199A3DE /* DSL.swift in Sources */, - 929FE93E64765FF5AE1BFBA880F12F4C /* ErrorUtility.swift in Sources */, - 7BA96342CEA620B4EDDD7C5D42B8446B /* Example.swift in Sources */, - D017DC2887E3EF5201451BAF25519567 /* ExampleGroup.swift in Sources */, - 826517FF4AF1F646EE0FDC01B6C82722 /* ExampleHooks.swift in Sources */, - 8F83B5ED706BFAA72FC788835E165942 /* ExampleMetadata.swift in Sources */, - 32A4654CFE28CA25FF57109B50458608 /* Filter.swift in Sources */, - AB6DD25D9C52C34F62068EB8635763F6 /* HooksPhase.swift in Sources */, - AC0F9DEB7167B144AD3A2175E0D48B8B /* NSBundle+CurrentTestBundle.swift in Sources */, - 236EB99AF4ED58D8A5B3E9F8B1A0246D /* NSString+QCKSelectorName.m in Sources */, - 82EB4519BD169631C09074DFC535E4B6 /* QCKDSL.m in Sources */, - DBB0527ADF9440FEF442BE39801F8585 /* Quick-dummy.m in Sources */, - E08122859DE3AE6BEA6079C4BA6A758D /* QuickConfiguration.m in Sources */, - 9B27F32E5D611571AF5233DCEF8CB00C /* QuickSelectedTestSuiteBuilder.swift in Sources */, - BE5AF0662CD8B472503A8E996260B213 /* QuickSpec.m in Sources */, - 535D3135B94BEAB04C06E35B082E903E /* QuickTestSuite.swift in Sources */, - 9590790CA8C71CFF36DBF303367C65BE /* String+FileName.swift in Sources */, - F76FAD73B802B3FA5D61EB667A79BC83 /* SuiteHooks.swift in Sources */, - 924BB4EFA04157C8C446B30422705105 /* World+DSL.swift in Sources */, - EDB7BCD432FD07A284C407A4B1F5C0A1 /* World.swift in Sources */, - 9C5DF5EA387519C5C1B8FA73FBE0014E /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5FEED44A5909604CBB444B6BE51B815D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - F51FDBE0B58714B7CCFC263E262B0842 /* Alamofire-dummy.m in Sources */, - 82D1A45C067C46EA182F5271C7CF8398 /* Alamofire.swift in Sources */, - A13F241863C06A82E01A3486274BAA3B /* Download.swift in Sources */, - 863E32885CF961E10C349860B945D58C /* Error.swift in Sources */, - 40B6973E8E5464C0C97726DC08D36735 /* Manager.swift in Sources */, - 734D4E9CBF9F977A8B62365C32ED517B /* MultipartFormData.swift in Sources */, - FB921E2C31223EFB30816D7DB741889B /* NetworkReachabilityManager.swift in Sources */, - 288B407C1861C325D63558155BE51969 /* Notifications.swift in Sources */, - E42A03C03AF789E657C8A1D228A725C2 /* ParameterEncoding.swift in Sources */, - 13202614FB4A2465FD5D212AC6393DE6 /* Request.swift in Sources */, - CFE6E0DA62CC3C0AA51C460558431C28 /* Response.swift in Sources */, - EDBD0FB0C34E68F787748DED462CAE6D /* ResponseSerialization.swift in Sources */, - BAE69CD22A7C90828180D3664DED8E1A /* Result.swift in Sources */, - 514A09BBB819F361E14EA3435507C489 /* ServerTrustPolicy.swift in Sources */, - 250B90954338EEFB0EBC6DAA23894DDA /* Stream.swift in Sources */, - 383F4AF6C46AA6AC9F9217AF905FB7D8 /* Timeline.swift in Sources */, - C86923E3A6648C9DE493F465644EE071 /* Upload.swift in Sources */, - AC0BD0F23C2A8C8F350899F45DB4F91F /* Validation.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 66CF5A604524D5A73EFB0DA2B361FDC8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1784,11 +1757,42 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9BDBD44EAD2CFF6A51CC96C708A3EFEA /* Sources */ = { + C279AABBC7864B185562DEDA51185511 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 291D078FB76A0C70A15A0ED41D435BC8 /* Pods-AstroTests-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D07A3F92DF973D5C849AB4DDF4F87CA7 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 02768FD7624F8269944D5B2F6F6FA849 /* Pods-AstroTests-dummy.m in Sources */, + D026942696BBAE215298038689DF4952 /* Callsite.swift in Sources */, + C964261AAFC1EA02B9305022B88C398A /* Closures.swift in Sources */, + 11D702668C883B3F7432A61A48FCCB41 /* Configuration.swift in Sources */, + 618631F3121DDE6420DB7A834BE996D6 /* DSL.swift in Sources */, + AE48DED43213E899DE5D21D14C7369AE /* ErrorUtility.swift in Sources */, + 3CD7D0CFD42577B550E17FB682EA74F4 /* Example.swift in Sources */, + BDDBBC50E7CFA0438AD014013745029F /* ExampleGroup.swift in Sources */, + A49866E583A9E617BA24334FBF8BF658 /* ExampleHooks.swift in Sources */, + 84CFEA055A12E312DA45E1AB5C64306D /* ExampleMetadata.swift in Sources */, + AC3B78B98A81CCCA230DA7A0BC4F10B1 /* Filter.swift in Sources */, + D7A646B09D05BD9423A1629EC6CC662B /* HooksPhase.swift in Sources */, + 7BE489F32BE286EB24CA28BEE8FCA4FE /* NSBundle+CurrentTestBundle.swift in Sources */, + F65BC45BCF2155582AFE03DE625352A3 /* NSString+QCKSelectorName.m in Sources */, + 707C7BA834D3573C883AE24BEEC1BBC3 /* QCKDSL.m in Sources */, + DB294A14E23364B8B2B4E46FD8677FFB /* Quick-dummy.m in Sources */, + 68DEA79938C67989D4B1DAE9A477CC34 /* QuickConfiguration.m in Sources */, + B37592A64C36F09413FA486F83F789F0 /* QuickSelectedTestSuiteBuilder.swift in Sources */, + 963E33529852F9EFB574D6160CDDE7D6 /* QuickSpec.m in Sources */, + 02411A2CA73A4024FDD335D6E08970AF /* QuickTestSuite.swift in Sources */, + 3C0916C48CA10162D3762D798BC0B110 /* String+FileName.swift in Sources */, + 81755C0A977CEA435BBCCD2C7E6DF8FE /* SuiteHooks.swift in Sources */, + 6F0D2A0EB1839F6661685B993584676F /* World+DSL.swift in Sources */, + 23F9469701D519F1496D3030618FD84B /* World.swift in Sources */, + 82122FF76AB199158E5EF889C4E0DC2A /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1801,12 +1805,6 @@ target = 91969E02CD48F26120134D15E489A85C /* Astro */; targetProxy = 092F98FBAB35E78D80635DC286DE6135 /* PBXContainerItemProxy */; }; - 5A9FBE1476ECAA5F653CEB42C3741EBB /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Nocilla; - target = 393E0E1A41299C44C63DBB766A243010 /* Nocilla */; - targetProxy = 28C8609FA1466917DCEC3D46AC819CCD /* PBXContainerItemProxy */; - }; 5BE60316A7B6307F3365F1D76E346822 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = SwiftTask; @@ -1819,11 +1817,17 @@ target = 79C040AFDDCE1BCBF6D8B5EB0B85887F /* Alamofire */; targetProxy = 6C69E40802B58122DBB0A67FBA0169FB /* PBXContainerItemProxy */; }; - 63A9FA5468BC49D26EB9EF614CCB0BCB /* PBXTargetDependency */ = { + 6A7DEBD1ECA87377F658B32B62B70431 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Quick; - target = A806B96D9DEB1A4DB63C09048B2EF00E /* Quick */; - targetProxy = 9AC142B18F4D42F065666B4445B18163 /* PBXContainerItemProxy */; + name = Freddy; + target = E693F703278AF18B59BC7B0FDF7B3650 /* Freddy */; + targetProxy = 2A44D5A0049F2A17AB1BBC1D5AD5455F /* PBXContainerItemProxy */; + }; + 6C1DFC770888B6737B495EAE80D19BE1 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Astro; + target = 91969E02CD48F26120134D15E489A85C /* Astro */; + targetProxy = 598910F769E32B1B71ADD162661845DE /* PBXContainerItemProxy */; }; 6D81F207B688DBE2615F76F7A952B140 /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -1831,38 +1835,64 @@ target = 79C040AFDDCE1BCBF6D8B5EB0B85887F /* Alamofire */; targetProxy = 922746A9F3FCCEE9C3C5F07A603960A0 /* PBXContainerItemProxy */; }; - 8C61511C7F16907EDD83B51428CB689B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Nimble; - target = 40FF1C77152F384080A1A02E90A36DA9 /* Nimble */; - targetProxy = 683066C568219244AEA91F2E2AB5065E /* PBXContainerItemProxy */; - }; 96A446CA9840C9BD82FAD02405E2E22C /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = SwiftTask; target = 658D059017BAD944D0775434631CF091 /* SwiftTask */; targetProxy = 4EADF7783FF5A64433DB52605C00B2FD /* PBXContainerItemProxy */; }; + C578AC1BBA6DA2F1427BECF9CC8171C8 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Quick; + target = C8DD2CC4E3F108C6E7F9BFEFBBDF393F /* Quick */; + targetProxy = C7DCC15B4B8B580880C05F4D918CF228 /* PBXContainerItemProxy */; + }; + D880540F35111F661E7290319BD57005 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Nocilla; + target = 393E0E1A41299C44C63DBB766A243010 /* Nocilla */; + targetProxy = A2D07F765E3F2C069C184ADCF3CF7507 /* PBXContainerItemProxy */; + }; DCF118E47792B1D75EFAD11D249DC840 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Freddy; target = E693F703278AF18B59BC7B0FDF7B3650 /* Freddy */; targetProxy = 44EE941BAC2FB6F90477DA65C72BFFED /* PBXContainerItemProxy */; }; + DDA097EBB4CBA18A805F41AF62909DD9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Nimble; + target = 40FF1C77152F384080A1A02E90A36DA9 /* Nimble */; + targetProxy = D3D896A7145B7E3F31F40780A713EE4D /* PBXContainerItemProxy */; + }; E951C5852BB777A049F2C12B8CA1CBEB /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Freddy; target = E693F703278AF18B59BC7B0FDF7B3650 /* Freddy */; targetProxy = BFE93B7ABE21DBDA8E25F6FE7513DB18 /* PBXContainerItemProxy */; }; + F11FFE9B6672233F413D7D4474FC8256 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SwiftTask; + target = 658D059017BAD944D0775434631CF091 /* SwiftTask */; + targetProxy = 891A50011E3559371B2E8F628DB7AEC2 /* PBXContainerItemProxy */; + }; + FDFEF1AD11325A58B4B227F1102ACD83 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Alamofire; + target = 79C040AFDDCE1BCBF6D8B5EB0B85887F /* Alamofire */; + targetProxy = 0189F1E291F050C04DDE62DE5EFFF95C /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 08A304315AAB666EF96BB540EBF0DD60 /* Release */ = { + 3C7A03550788BBC71428829DF8D07A1A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 748EA67BCFF48DE8E76C6F13965EE8E6 /* Astro.xcconfig */; + baseConfigurationReference = CA287004F6A3A6417DCAA1D18E5C5BA4 /* Pods-Astro.release.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; @@ -1871,28 +1901,77 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Astro/Astro-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Astro/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-Astro/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/Astro/Astro.modulemap"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Astro/Pods-Astro.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Astro; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_Astro; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - 08E07D38FCD8337813B3828E03AE2D42 /* Debug */ = { + 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; + }; + 6AF65E93BC3EE1B1F29F17EB8A26E3F5 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 54509D781D6C2DA65347973554D03C73 /* Quick.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; @@ -1912,150 +1991,122 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 32AD5F8918CA8B349E4671410FA624C9 /* Release */ = { + 738B64946CE425D14D365A78F86D30AC /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CD60EA3B4AA4B9F19346C586E4705D37 /* Alamofire.xcconfig */; + baseConfigurationReference = 6B4BE48F7C4B52024AA898C9C47426F5 /* Pods-Astro.debug.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-Astro/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Alamofire; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Astro/Pods-Astro.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_Astro; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - 3BD5D5B41C28F6A18DF88BA95EFABCDC /* Release */ = { + 7F93EF234CD87F7448472375CC1EFA96 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E3C934F55950F055755F2FB5E331DA9B /* SwiftTask.xcconfig */; + baseConfigurationReference = D29BCABEA6BBEBF1CFD4012121C0264B /* Alamofire.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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/SwiftTask/SwiftTask-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SwiftTask/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; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/SwiftTask/SwiftTask.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = SwiftTask; - SDKROOT = iphoneos; + MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = Alamofire; + SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; - }; - 47BEF9D903506B003EA5C2B249729489 /* 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; - 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 = 8.0; - ONLY_ACTIVE_ARCH = YES; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; name = Debug; }; - 483AE4906DA1AD1B04D9BFA5D3D59C5B /* Release */ = { + 8085E9DF9F97ED6DCA51FF788FACD219 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 018233AF6177486FA08EDB6B819B8852 /* Nimble.xcconfig */; + baseConfigurationReference = E3C934F55950F055755F2FB5E331DA9B /* SwiftTask.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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/Nimble/Nimble-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Nimble/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/SwiftTask/SwiftTask-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SwiftTask/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/Nimble/Nimble.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Nimble; + MODULEMAP_FILE = "Target Support Files/SwiftTask/SwiftTask.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = SwiftTask; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - 5AB9D94A324B8E10031AD6CFEA74566D /* Release */ = { + 817531D6BFB47AFBE4B8AC3E6E829BF0 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4B41E2C6F9BDDB8E500A76ACD24DC2A6 /* Pods-AstroTests.release.xcconfig */; + baseConfigurationReference = 748EA67BCFF48DE8E76C6F13965EE8E6 /* Astro.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; @@ -2064,32 +2115,30 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-AstroTests/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Astro/Astro-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Astro/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"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-AstroTests/Pods-AstroTests.modulemap"; + MODULEMAP_FILE = "Target Support Files/Astro/Astro.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_AstroTests; + PRODUCT_NAME = Astro; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - 619CD5047A76C1C7DC0C2435219B1641 /* Debug */ = { + 84E7DBDB3B548257E0737CC3CC22DE0C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E5C600D0851A3EFA2A461D6559885924 /* Freddy.xcconfig */; + baseConfigurationReference = 748EA67BCFF48DE8E76C6F13965EE8E6 /* Astro.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; @@ -2098,95 +2147,135 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Freddy/Freddy-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Freddy/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Astro/Astro-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Astro/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/Freddy/Freddy.modulemap"; + MODULEMAP_FILE = "Target Support Files/Astro/Astro.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Freddy; + PRODUCT_NAME = Astro; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 6740085242C5F4612B71460E80C6F5FF /* Debug */ = { + 878E6A7A8AFC976C4CA0708416D59337 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6802180060568B48E5AA39180D643845 /* Pods-Astro.debug.xcconfig */; + baseConfigurationReference = 8FFD28BC7177BDC4BB2FC768DF2682AF /* Nocilla.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; - INFOPLIST_FILE = "Target Support Files/Pods-Astro/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Nocilla/Nocilla-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Nocilla/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-Astro/Pods-Astro.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_Astro; + MODULEMAP_FILE = "Target Support Files/Nocilla/Nocilla.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = Nocilla; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 75218111E718FACE36F771E8ABECDB62 /* Debug */ = { + A4430C9A172B825D8C3897B6DC93C8D4 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CD60EA3B4AA4B9F19346C586E4705D37 /* Alamofire.xcconfig */; + baseConfigurationReference = 018233AF6177486FA08EDB6B819B8852 /* Nimble.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Nimble/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 = YES; - PRODUCT_NAME = Alamofire; + MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = Nimble; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 85D9395EDE282E7C6BAEA33D5666B76A /* Debug */ = { + B7324857C38B065FEB1EEE3105C2367A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 018233AF6177486FA08EDB6B819B8852 /* Nimble.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + 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 = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + 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; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + C88DD470FF2F9AD3DBD5E137ED98B4FE /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8FFD28BC7177BDC4BB2FC768DF2682AF /* Nocilla.xcconfig */; + buildSettings = { + "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; @@ -2195,29 +2284,30 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Nimble/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Nocilla/Nocilla-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Nocilla/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/Nimble/Nimble.modulemap"; + MODULEMAP_FILE = "Target Support Files/Nocilla/Nocilla.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Nimble; + PRODUCT_NAME = Nocilla; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 9BA46B249725A312A97956A471EC5CC3 /* Release */ = { + CA8704554766DA411A89EC8663C68738 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 54509D781D6C2DA65347973554D03C73 /* Quick.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; @@ -2236,18 +2326,20 @@ PRODUCT_NAME = Quick; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - A2DC25BBBC0073586AD0E504FAD29FB5 /* Debug */ = { + CB96EAD78D4B3D218426A4A86C8D7767 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E3C934F55950F055755F2FB5E331DA9B /* SwiftTask.xcconfig */; + baseConfigurationReference = A6400E50E54416E65C9CC894AE6EA6F5 /* Pods-AstroTests.debug.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; @@ -2256,98 +2348,66 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/SwiftTask/SwiftTask-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SwiftTask/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-AstroTests/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/SwiftTask/SwiftTask.modulemap"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-AstroTests/Pods-AstroTests.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = SwiftTask; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_AstroTests; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - AAF678CED40D3499169D10F63CA0719E /* Release */ = { - 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; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - 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 = 8.0; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - C9E0C3F43596A922DF08610E81B1ACB8 /* Debug */ = { + D553F8F088806726C51F383152DC492A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 748EA67BCFF48DE8E76C6F13965EE8E6 /* Astro.xcconfig */; + baseConfigurationReference = E5C600D0851A3EFA2A461D6559885924 /* Freddy.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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/Astro/Astro-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Astro/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Freddy/Freddy-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Freddy/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/Astro/Astro.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Astro; + MODULEMAP_FILE = "Target Support Files/Freddy/Freddy.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = Freddy; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - CB863B3E4E2C477831A313DC75ED9EBD /* Release */ = { + D85E6658CB2A09847590C3E4558B30D0 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1640764CAB261E1814B1BA7709848F58 /* Pods-Astro.release.xcconfig */; + baseConfigurationReference = BC5AC734889E8683DD50A1C886C6A720 /* Pods-AstroTests.release.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; @@ -2356,32 +2416,33 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-Astro/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-AstroTests/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"; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-Astro/Pods-Astro.modulemap"; + MODULEMAP_FILE = "Target Support Files/Pods-AstroTests/Pods-AstroTests.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_Astro; + PRODUCT_NAME = Pods_AstroTests; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - D7FDD52E5B79A418162D75F787ED258E /* Release */ = { + DDA5A606A0B7062DEA5E47CD9FA65A3D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8FFD28BC7177BDC4BB2FC768DF2682AF /* Nocilla.xcconfig */; + baseConfigurationReference = D29BCABEA6BBEBF1CFD4012121C0264B /* Alamofire.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; @@ -2390,27 +2451,30 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Nocilla/Nocilla-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Nocilla/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; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Nocilla/Nocilla.modulemap"; + MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Nocilla; + PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - E09F9FDADF04D3E7A36776069400600B /* Debug */ = { + E1D7FA5E8F224B121D0ECBD7ED084C38 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8FFD28BC7177BDC4BB2FC768DF2682AF /* Nocilla.xcconfig */; + baseConfigurationReference = 018233AF6177486FA08EDB6B819B8852 /* Nimble.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; @@ -2419,29 +2483,33 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Nocilla/Nocilla-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Nocilla/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Nimble/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/Nocilla/Nocilla.modulemap"; + MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Nocilla; + PRODUCT_NAME = Nimble; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - F878C80CD90E99948C73FD52B6935672 /* Release */ = { + F5B7D171842D46482AD965979B7DBA86 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = E5C600D0851A3EFA2A461D6559885924 /* Freddy.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; @@ -2454,51 +2522,49 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/Freddy/Freddy.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; + MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_NAME = Freddy; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - FACBF971F88F235E565C68B3573ECE0D /* Debug */ = { + FB4380981681EFB3C784C8284CEF01AB /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F63DCD4CFAFE4F7967822B5A4D971100 /* Pods-AstroTests.debug.xcconfig */; + baseConfigurationReference = E3C934F55950F055755F2FB5E331DA9B /* SwiftTask.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; - INFOPLIST_FILE = "Target Support Files/Pods-AstroTests/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/SwiftTask/SwiftTask-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SwiftTask/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-AstroTests/Pods-AstroTests.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_AstroTests; + MODULEMAP_FILE = "Target Support Files/SwiftTask/SwiftTask.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = SwiftTask; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; /* End XCBuildConfiguration section */ @@ -2506,8 +2572,8 @@ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 47BEF9D903506B003EA5C2B249729489 /* Debug */, - AAF678CED40D3499169D10F63CA0719E /* Release */, + 59B042A655B7C20CBAB90E385BF4E4C7 /* Debug */, + B7324857C38B065FEB1EEE3105C2367A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2515,35 +2581,35 @@ 3CFB42910790CF0BDBCCEBAACD6B9367 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { isa = XCConfigurationList; buildConfigurations = ( - 75218111E718FACE36F771E8ABECDB62 /* Debug */, - 32AD5F8918CA8B349E4671410FA624C9 /* Release */, + 7F93EF234CD87F7448472375CC1EFA96 /* Debug */, + DDA5A606A0B7062DEA5E47CD9FA65A3D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 4655531C845E8D36877301C76982FD46 /* Build configuration list for PBXNativeTarget "Quick" */ = { + 73B58F5C5988800360A457890DA7ED9B /* Build configuration list for PBXNativeTarget "Pods-AstroTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 08E07D38FCD8337813B3828E03AE2D42 /* Debug */, - 9BA46B249725A312A97956A471EC5CC3 /* Release */, + CB96EAD78D4B3D218426A4A86C8D7767 /* Debug */, + D85E6658CB2A09847590C3E4558B30D0 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 846A64A59C7983583040AD4BF0DD2601 /* Build configuration list for PBXNativeTarget "Pods-Astro" */ = { + 835D37CFD29374FD1E92E16925314431 /* Build configuration list for PBXNativeTarget "Quick" */ = { isa = XCConfigurationList; buildConfigurations = ( - 6740085242C5F4612B71460E80C6F5FF /* Debug */, - CB863B3E4E2C477831A313DC75ED9EBD /* Release */, + 6AF65E93BC3EE1B1F29F17EB8A26E3F5 /* Debug */, + CA8704554766DA411A89EC8663C68738 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 8F3DD3BC50DF7C47C729F63BC1A9400A /* Build configuration list for PBXNativeTarget "Pods-AstroTests" */ = { + 846A64A59C7983583040AD4BF0DD2601 /* Build configuration list for PBXNativeTarget "Pods-Astro" */ = { isa = XCConfigurationList; buildConfigurations = ( - FACBF971F88F235E565C68B3573ECE0D /* Debug */, - 5AB9D94A324B8E10031AD6CFEA74566D /* Release */, + 738B64946CE425D14D365A78F86D30AC /* Debug */, + 3C7A03550788BBC71428829DF8D07A1A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2551,8 +2617,8 @@ A4964CB88DC1058EA701972205BBB4A0 /* Build configuration list for PBXNativeTarget "Nimble" */ = { isa = XCConfigurationList; buildConfigurations = ( - 85D9395EDE282E7C6BAEA33D5666B76A /* Debug */, - 483AE4906DA1AD1B04D9BFA5D3D59C5B /* Release */, + E1D7FA5E8F224B121D0ECBD7ED084C38 /* Debug */, + A4430C9A172B825D8C3897B6DC93C8D4 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2560,8 +2626,8 @@ CFC1B17C6D2D8BA2E80A422D19324095 /* Build configuration list for PBXNativeTarget "Nocilla" */ = { isa = XCConfigurationList; buildConfigurations = ( - E09F9FDADF04D3E7A36776069400600B /* Debug */, - D7FDD52E5B79A418162D75F787ED258E /* Release */, + C88DD470FF2F9AD3DBD5E137ED98B4FE /* Debug */, + 878E6A7A8AFC976C4CA0708416D59337 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2569,8 +2635,8 @@ D0597917244B17E9F5BCE9F855FC687B /* Build configuration list for PBXNativeTarget "Astro" */ = { isa = XCConfigurationList; buildConfigurations = ( - C9E0C3F43596A922DF08610E81B1ACB8 /* Debug */, - 08A304315AAB666EF96BB540EBF0DD60 /* Release */, + 84E7DBDB3B548257E0737CC3CC22DE0C /* Debug */, + 817531D6BFB47AFBE4B8AC3E6E829BF0 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2578,8 +2644,8 @@ D21FA82B54A37B40002C4BF573D1D9B4 /* Build configuration list for PBXNativeTarget "Freddy" */ = { isa = XCConfigurationList; buildConfigurations = ( - 619CD5047A76C1C7DC0C2435219B1641 /* Debug */, - F878C80CD90E99948C73FD52B6935672 /* Release */, + F5B7D171842D46482AD965979B7DBA86 /* Debug */, + D553F8F088806726C51F383152DC492A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2587,8 +2653,8 @@ E9ABD119A88865462F5930D19C7E8060 /* Build configuration list for PBXNativeTarget "SwiftTask" */ = { isa = XCConfigurationList; buildConfigurations = ( - A2DC25BBBC0073586AD0E504FAD29FB5 /* Debug */, - 3BD5D5B41C28F6A18DF88BA95EFABCDC /* Release */, + 8085E9DF9F97ED6DCA51FF788FACD219 /* Debug */, + FB4380981681EFB3C784C8284CEF01AB /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Pods/SwiftTask/SwiftTask/Cancellable.swift b/Pods/SwiftTask/SwiftTask/Cancellable.swift index 51c6ea2..d9cd581 100644 --- a/Pods/SwiftTask/SwiftTask/Cancellable.swift +++ b/Pods/SwiftTask/SwiftTask/Cancellable.swift @@ -12,30 +12,19 @@ public protocol Cancellable { associatedtype _Error - // - // NOTE: - // Single `func cancel(error: Error) -> Bool` is preferred (as first implemented in 8a22ed5), - // but two overloaded methods are required for SwiftTask ver 3.x API compatibility. - // - func cancel() -> Bool - func cancel(error error: _Error) -> Bool + func cancel(error: _Error) -> Bool } public class Canceller: Cancellable { - private var cancelHandler: (Void -> Void)? + private var cancelHandler: (() -> Void)? - public required init(cancelHandler: Void -> Void) + public required init(cancelHandler: @escaping () -> Void) { self.cancelHandler = cancelHandler } - public func cancel() -> Bool - { - return self.cancel(error: ()) - } - - public func cancel(error error: Void) -> Bool + @discardableResult public func cancel(error: Void = ()) -> Bool { if let cancelHandler = self.cancelHandler { self.cancelHandler = nil @@ -53,4 +42,4 @@ public class AutoCanceller: Canceller { self.cancel() } -} \ No newline at end of file +} diff --git a/Pods/SwiftTask/SwiftTask/SwiftTask.swift b/Pods/SwiftTask/SwiftTask/SwiftTask.swift index e69c25e..de172bb 100644 --- a/Pods/SwiftTask/SwiftTask/SwiftTask.swift +++ b/Pods/SwiftTask/SwiftTask/SwiftTask.swift @@ -27,9 +27,9 @@ public enum TaskState: String, CustomStringConvertible // NOTE: use class instead of struct to pass reference to `_initClosure` to set `pause`/`resume`/`cancel` closures public class TaskConfiguration { - public var pause: (Void -> Void)? - public var resume: (Void -> Void)? - public var cancel: (Void -> Void)? + public var pause: (() -> Void)? + public var resume: (() -> Void)? + public var cancel: (() -> Void)? /// useful to terminate immediate-infinite-sequence while performing `initClosure` public var isFinished : Bool @@ -57,25 +57,25 @@ public class TaskConfiguration } } -public class Task: Cancellable, CustomStringConvertible +open class Task: Cancellable, CustomStringConvertible { public typealias ProgressTuple = (oldProgress: Progress?, newProgress: Progress) public typealias ErrorInfo = (error: Error?, isCancelled: Bool) - public typealias ProgressHandler = (Progress -> Void) - public typealias FulfillHandler = (Value -> Void) - public typealias RejectHandler = (Error -> Void) + public typealias ProgressHandler = (Progress) -> Void + public typealias FulfillHandler = (Value) -> Void + public typealias RejectHandler = (Error) -> Void public typealias Configuration = TaskConfiguration - public typealias PromiseInitClosure = (fulfill: FulfillHandler, reject: RejectHandler) -> Void - public typealias InitClosure = (progress: ProgressHandler, fulfill: FulfillHandler, reject: RejectHandler, configure: TaskConfiguration) -> Void + public typealias PromiseInitClosure = (_ fulfill: FulfillHandler, _ reject: RejectHandler) -> Void + public typealias InitClosure = (_ progress: @escaping ProgressHandler, _ fulfill: @escaping FulfillHandler, _ reject: @escaping RejectHandler, _ configure: TaskConfiguration) -> Void internal typealias _Machine = _StateMachine - internal typealias _InitClosure = (machine: _Machine, progress: ProgressHandler, fulfill: FulfillHandler, _reject: _RejectInfoHandler, configure: TaskConfiguration) -> Void + internal typealias _InitClosure = (_ machine: _Machine, _ progress: @escaping ProgressHandler, _ fulfill: @escaping FulfillHandler, _ _reject: @escaping _RejectInfoHandler, _ configure: TaskConfiguration) -> Void - internal typealias _ProgressTupleHandler = (ProgressTuple -> Void) - internal typealias _RejectInfoHandler = (ErrorInfo -> Void) + internal typealias _ProgressTupleHandler = (ProgressTuple) -> Void + internal typealias _RejectInfoHandler = (ErrorInfo) -> Void internal let _machine: _Machine @@ -97,7 +97,7 @@ public class Task: Cancellable, CustomStringConvertible public var name: String = "DefaultTask" - public var description: String + open var description: String { var valueString: String? @@ -126,7 +126,7 @@ public class Task: Cancellable, CustomStringConvertible /// /// - Returns: New task. /// - public init(weakified: Bool, paused: Bool, initClosure: InitClosure) + public init(weakified: Bool, paused: Bool, initClosure: @escaping InitClosure) { self._weakified = weakified self._paused = paused @@ -134,7 +134,7 @@ public class Task: Cancellable, CustomStringConvertible let _initClosure: _InitClosure = { _, progress, fulfill, _reject, configure in // NOTE: don't expose rejectHandler with ErrorInfo (isCancelled) for public init - initClosure(progress: progress, fulfill: fulfill, reject: { error in _reject(ErrorInfo(error: Optional(error), isCancelled: false)) }, configure: configure) + initClosure(progress, fulfill, { error in _reject(ErrorInfo(error: Optional(error), isCancelled: false)) }, configure) } self.setup(weakified: weakified, paused: paused, _initClosure: _initClosure) @@ -145,7 +145,7 @@ public class Task: Cancellable, CustomStringConvertible /// /// - e.g. Task(paused: false) { progress, fulfill, reject, configure in ... } /// - public convenience init(paused: Bool, initClosure: InitClosure) + public convenience init(paused: Bool, initClosure: @escaping InitClosure) { self.init(weakified: false, paused: paused, initClosure: initClosure) } @@ -155,7 +155,7 @@ public class Task: Cancellable, CustomStringConvertible /// /// - e.g. Task { progress, fulfill, reject, configure in ... } /// - public convenience init(initClosure: InitClosure) + public convenience init(initClosure: @escaping InitClosure) { self.init(weakified: false, paused: false, initClosure: initClosure) } @@ -191,16 +191,16 @@ public class Task: Cancellable, CustomStringConvertible /// /// - e.g. Task { fulfill, reject in ... } /// - public convenience init(promiseInitClosure: PromiseInitClosure) + public convenience init(promiseInitClosure: @escaping PromiseInitClosure) { self.init(initClosure: { progress, fulfill, reject, configure in - promiseInitClosure(fulfill: fulfill, reject: { error in reject(error) }) + promiseInitClosure(fulfill, { error in reject(error) }) }) } /// internal-init for accessing `machine` inside `_initClosure` /// (NOTE: _initClosure has _RejectInfoHandler as argument) - internal init(weakified: Bool = false, paused: Bool = false, _initClosure: _InitClosure) + internal init(weakified: Bool = false, paused: Bool = false, _initClosure: @escaping _InitClosure) { self._weakified = weakified self._paused = paused @@ -210,7 +210,7 @@ public class Task: Cancellable, CustomStringConvertible } // NOTE: don't use `internal init` for this setup method, or this will be a designated initializer - internal func setup(weakified weakified: Bool, paused: Bool, _initClosure: _InitClosure) + internal func setup(weakified: Bool, paused: Bool, _initClosure: @escaping _InitClosure) { // #if DEBUG // let addr = String(format: "%p", unsafeAddressOf(self)) @@ -274,7 +274,7 @@ public class Task: Cancellable, CustomStringConvertible } } - _initClosure(machine: self_._machine, progress: progressHandler, fulfill: fulfillHandler, _reject: rejectInfoHandler, configure: self_._machine.configuration) + _initClosure(self_._machine, progressHandler, fulfillHandler, rejectInfoHandler, self_._machine.configuration) } @@ -293,11 +293,11 @@ public class Task: Cancellable, CustomStringConvertible // #endif // cancel in case machine is still running - self._cancel(nil) + self.cancel(error: nil) } /// Sets task name (method chainable) - public func name(name: String) -> Self + public func name(_ name: String) -> Self { self.name = name return self @@ -312,7 +312,7 @@ public class Task: Cancellable, CustomStringConvertible } /// Returns new task that is retryable for `maxRetryCount (= maxTryCount-1)` times. - public func retry(maxRetryCount: Int) -> Task + public func retry(_ maxRetryCount: Int) -> Task { if maxRetryCount < 1 { return self } @@ -356,13 +356,13 @@ public class Task: Cancellable, CustomStringConvertible /// - Note: `oldProgress` is always nil when `weakified = true` /// - Returns: Self (same `Task`) /// - public func progress(progressClosure: ProgressTuple -> Void) -> Self + @discardableResult public func progress(progressClosure: @escaping (ProgressTuple) -> Void) -> Self { var dummyCanceller: Canceller? = nil return self.progress(&dummyCanceller, progressClosure) } - public func progress(inout canceller: C?, _ progressClosure: ProgressTuple -> Void) -> Self + public func progress(_ canceller: inout C?, _ progressClosure: @escaping (ProgressTuple) -> Void) -> Self { var token: _HandlerToken? = nil self._machine.addProgressTupleHandler(&token, progressClosure) @@ -382,13 +382,13 @@ public class Task: Cancellable, CustomStringConvertible /// /// - Returns: New `Task` /// - public func then(thenClosure: (Value?, ErrorInfo?) -> Value2) -> Task + @discardableResult public func then(thenClosure: @escaping (Value?, ErrorInfo?) -> Value2) -> Task { var dummyCanceller: Canceller? = nil return self.then(&dummyCanceller, thenClosure) } - public func then(inout canceller: C?, _ thenClosure: (Value?, ErrorInfo?) -> Value2) -> Task + public func then(_ canceller: inout C?, _ thenClosure: @escaping (Value?, ErrorInfo?) -> Value2) -> Task { return self.then(&canceller) { (value, errorInfo) -> Task in return Task(value: thenClosure(value, errorInfo)) @@ -403,7 +403,7 @@ public class Task: Cancellable, CustomStringConvertible /// /// - Returns: New `Task` /// - public func then(thenClosure: (Value?, ErrorInfo?) -> Task) -> Task + public func then(thenClosure: @escaping (Value?, ErrorInfo?) -> Task) -> Task { var dummyCanceller: Canceller? = nil return self.then(&dummyCanceller, thenClosure) @@ -417,7 +417,7 @@ public class Task: Cancellable, CustomStringConvertible // /// - Returns: New `Task` /// - public func then(inout canceller: C?, _ thenClosure: (Value?, ErrorInfo?) -> Task) -> Task + public func then(_ canceller: inout C?, _ thenClosure: @escaping (Value?, ErrorInfo?) -> Task) -> Task { return Task { [unowned self, weak canceller] newMachine, progress, fulfill, _reject, configure in @@ -439,7 +439,7 @@ public class Task: Cancellable, CustomStringConvertible } /// invokes `completionHandler` "now" or "in the future" - private func _then(inout canceller: C?, _ completionHandler: Void -> Void) + private func _then(_ canceller: inout C?, _ completionHandler: @escaping () -> Void) { switch self.state { case .Fulfilled, .Rejected, .Cancelled: @@ -462,13 +462,13 @@ public class Task: Cancellable, CustomStringConvertible /// /// - Returns: New `Task` /// - public func success(successClosure: Value -> Value2) -> Task + @discardableResult public func success(successClosure: @escaping (Value) -> Value2) -> Task { var dummyCanceller: Canceller? = nil return self.success(&dummyCanceller, successClosure) } - public func success(inout canceller: C?, _ successClosure: Value -> Value2) -> Task + public func success(_ canceller: inout C?, _ successClosure: @escaping (Value) -> Value2) -> Task { return self.success(&canceller) { (value: Value) -> Task in return Task(value: successClosure(value)) @@ -483,20 +483,21 @@ public class Task: Cancellable, CustomStringConvertible /// /// - Returns: New `Task` /// - public func success(successClosure: Value -> Task) -> Task + public func success(successClosure: @escaping (Value) -> Task) -> Task { var dummyCanceller: Canceller? = nil return self.success(&dummyCanceller, successClosure) } - public func success(inout canceller: C?, _ successClosure: Value -> Task) -> Task + public func success(_ canceller: inout C?, _ successClosure: @escaping (Value) -> Task) -> Task { + var localCanceller = canceller; defer { canceller = localCanceller } return Task { [unowned self] newMachine, progress, fulfill, _reject, configure in let selfMachine = self._machine // NOTE: using `self._then()` + `selfMachine` instead of `self.then()` will reduce Task allocation - self._then(&canceller) { + self._then(&localCanceller) { if let value = selfMachine.value.rawValue { let innerTask = successClosure(value) _bindInnerTask(innerTask, newMachine, progress, fulfill, _reject, configure) @@ -518,13 +519,13 @@ public class Task: Cancellable, CustomStringConvertible /// /// - Returns: New `Task` /// - public func failure(failureClosure: ErrorInfo -> Value) -> Task + @discardableResult public func failure(failureClosure: @escaping (ErrorInfo) -> Value) -> Task { var dummyCanceller: Canceller? = nil return self.failure(&dummyCanceller, failureClosure) } - public func failure(inout canceller: C?, _ failureClosure: ErrorInfo -> Value) -> Task + public func failure(_ canceller: inout C?, _ failureClosure: @escaping (ErrorInfo) -> Value) -> Task { return self.failure(&canceller) { (errorInfo: ErrorInfo) -> Task in return Task(value: failureClosure(errorInfo)) @@ -540,19 +541,20 @@ public class Task: Cancellable, CustomStringConvertible /// /// - Returns: New `Task` /// - public func failure(failureClosure: ErrorInfo -> Task) -> Task + public func failure(failureClosure: @escaping (ErrorInfo) -> Task) -> Task { var dummyCanceller: Canceller? = nil return self.failure(&dummyCanceller, failureClosure) } - public func failure(inout canceller: C?, _ failureClosure: ErrorInfo -> Task) -> Task + public func failure(_ canceller: inout C?, _ failureClosure: @escaping (ErrorInfo) -> Task) -> Task { + var localCanceller = canceller; defer { canceller = localCanceller } return Task { [unowned self] newMachine, progress, fulfill, _reject, configure in let selfMachine = self._machine - self._then(&canceller) { + self._then(&localCanceller) { if let value = selfMachine.value.rawValue { fulfill(value) } @@ -571,13 +573,13 @@ public class Task: Cancellable, CustomStringConvertible /// - Note: This method doesn't create new task, so it has better performance over `then()`/`success()`/`failure()`. /// - Returns: Self (same `Task`) /// - public func on(success success: (Value -> Void)? = nil, failure: (ErrorInfo -> Void)? = nil) -> Self + @discardableResult public func on(success: ((Value) -> Void)? = nil, failure: ((ErrorInfo) -> Void)? = nil) -> Self { var dummyCanceller: Canceller? = nil return self.on(&dummyCanceller, success: success, failure: failure) } - public func on(inout canceller: C?, success: (Value -> Void)? = nil, failure: (ErrorInfo -> Void)? = nil) -> Self + public func on(_ canceller: inout C?, success: ((Value) -> Void)? = nil, failure: ((ErrorInfo) -> Void)? = nil) -> Self { let selfMachine = self._machine @@ -594,36 +596,19 @@ public class Task: Cancellable, CustomStringConvertible } /// Pause task. - public func pause() -> Bool + @discardableResult public func pause() -> Bool { return self._machine.handlePause() } /// Resume task. - public func resume() -> Bool + @discardableResult public func resume() -> Bool { return self._machine.handleResume() } - // - // NOTE: - // To conform to `Cancellable`, this method is needed in replace of: - // - `public func cancel(error: Error? = nil) -> Bool` - // - `public func cancel(_ error: Error? = nil) -> Bool` (segfault in Swift 1.2) - // - /// Cancel task. - public func cancel() -> Bool - { - return self.cancel(error: nil) - } - /// Cancel task. - public func cancel(error error: Error?) -> Bool - { - return self._cancel(error) - } - - internal func _cancel(error: Error? = nil) -> Bool + @discardableResult public func cancel(error: Error? = nil) -> Bool { return self._machine.handleCancel(error) } @@ -633,11 +618,11 @@ public class Task: Cancellable, CustomStringConvertible // MARK: - Helper internal func _bindInnerTask( - innerTask: Task, + _ innerTask: Task, _ newMachine: _StateMachine, - _ progress: Task.ProgressHandler, - _ fulfill: Task.FulfillHandler, - _ _reject: Task._RejectInfoHandler, + _ progress: @escaping Task.ProgressHandler, + _ fulfill: @escaping Task.FulfillHandler, + _ _reject: @escaping Task._RejectInfoHandler, _ configure: TaskConfiguration ) { @@ -688,7 +673,7 @@ extension Task { public typealias BulkProgress = (completedCount: Int, totalCount: Int) - public class func all(tasks: [Task]) -> Task + public class func all(_ tasks: [Task]) -> Task { guard !tasks.isEmpty else { return Task(value: []) @@ -699,6 +684,7 @@ extension Task var completedCount = 0 let totalCount = tasks.count let lock = _RecursiveLock() + let cancelled = _Atomic(false) for task in tasks { task.success { (value: Value) -> Void in @@ -721,25 +707,32 @@ extension Task lock.unlock() }.failure { (errorInfo: ErrorInfo) -> Void in - - lock.lock() - _reject(errorInfo) - - for task in tasks { - task.cancel() + + let changed = cancelled.updateIf { $0 == false ? true : nil } + if changed != nil { + lock.lock() + _reject(errorInfo) + + for task in tasks { + task.cancel() + } + lock.unlock() } - lock.unlock() } } configure.pause = { self.pauseAll(tasks); return } configure.resume = { self.resumeAll(tasks); return } - configure.cancel = { self.cancelAll(tasks); return } + configure.cancel = { + if !cancelled.rawValue { + self.cancelAll(tasks); + } + } }.name("Task.all") } - public class func any(tasks: [Task]) -> Task + public class func any(_ tasks: [Task]) -> Task { precondition(!tasks.isEmpty, "`Task.any(tasks)` with empty `tasks` should not be called. It will never be fulfilled or rejected.") @@ -787,7 +780,7 @@ extension Task /// Returns new task which performs all given tasks and stores only fulfilled values. /// This new task will NEVER be internally rejected. - public class func some(tasks: [Task]) -> Task + public class func some(_ tasks: [Task]) -> Task { guard !tasks.isEmpty else { return Task(value: []) @@ -831,24 +824,24 @@ extension Task }.name("Task.some") } - public class func cancelAll(tasks: [Task]) + public class func cancelAll(_ tasks: [Task]) { for task in tasks { - task._cancel() + task.cancel() } } - public class func pauseAll(tasks: [Task]) + public class func pauseAll(_ tasks: [Task]) { for task in tasks { task.pause() } } - public class func resumeAll(tasks: [Task]) + public class func resumeAll(_ tasks: [Task]) { for task in tasks { task.resume() } } -} \ No newline at end of file +} diff --git a/Pods/SwiftTask/SwiftTask/_Atomic.swift b/Pods/SwiftTask/SwiftTask/_Atomic.swift index 0f14c1a..cf48b9f 100644 --- a/Pods/SwiftTask/SwiftTask/_Atomic.swift +++ b/Pods/SwiftTask/SwiftTask/_Atomic.swift @@ -11,14 +11,14 @@ import Darwin internal final class _Atomic { private var _spinlock = OS_SPINLOCK_INIT - private var _rawValue: T + fileprivate var _rawValue: T internal init(_ rawValue: T) { self._rawValue = rawValue } - internal func withRawValue(@noescape f: T -> U) -> U + internal func withRawValue(_ f: (T) -> U) -> U { self._lock() defer { self._unlock() } @@ -26,17 +26,17 @@ internal final class _Atomic return f(self._rawValue) } - internal func update(@noescape f: T -> T) -> T + internal func update(_ f: (T) -> T) -> T { return self.updateIf { f($0) }! } - internal func updateIf(@noescape f: T -> T?) -> T? + internal func updateIf(_ f: (T) -> T?) -> T? { return self.modify { value in f(value).map { ($0, value) } } } - internal func modify(@noescape f: T -> (T, U)?) -> U? + internal func modify(_ f: (T) -> (T, U)?) -> U? { self._lock() defer { self._unlock() } @@ -51,14 +51,14 @@ internal final class _Atomic } } - private func _lock() + fileprivate func _lock() { - withUnsafeMutablePointer(&self._spinlock, OSSpinLockLock) + withUnsafeMutablePointer(to: &self._spinlock, OSSpinLockLock) } - private func _unlock() + fileprivate func _unlock() { - withUnsafeMutablePointer(&self._spinlock, OSSpinLockUnlock) + withUnsafeMutablePointer(to: &self._spinlock, OSSpinLockUnlock) } } @@ -91,6 +91,6 @@ extension _Atomic: CustomStringConvertible { internal var description: String { - return String(self.rawValue) + return String(describing: self.rawValue) } -} \ No newline at end of file +} diff --git a/Pods/SwiftTask/SwiftTask/_RecursiveLock.swift b/Pods/SwiftTask/SwiftTask/_RecursiveLock.swift index fb0a279..08365d4 100644 --- a/Pods/SwiftTask/SwiftTask/_RecursiveLock.swift +++ b/Pods/SwiftTask/SwiftTask/_RecursiveLock.swift @@ -15,8 +15,8 @@ internal final class _RecursiveLock internal init() { - self.mutex = UnsafeMutablePointer.alloc(1) - self.attribute = UnsafeMutablePointer.alloc(1) + self.mutex = UnsafeMutablePointer.allocate(capacity: 1) + self.attribute = UnsafeMutablePointer.allocate(capacity: 1) pthread_mutexattr_init(self.attribute) pthread_mutexattr_settype(self.attribute, PTHREAD_MUTEX_RECURSIVE) @@ -28,8 +28,8 @@ internal final class _RecursiveLock pthread_mutexattr_destroy(self.attribute) pthread_mutex_destroy(self.mutex) - self.attribute.dealloc(1) - self.mutex.dealloc(1) + self.attribute.deallocate(capacity: 1) + self.mutex.deallocate(capacity: 1) } internal func lock() diff --git a/Pods/SwiftTask/SwiftTask/_StateMachine.swift b/Pods/SwiftTask/SwiftTask/_StateMachine.swift index 50f0fa9..1a19b1e 100644 --- a/Pods/SwiftTask/SwiftTask/_StateMachine.swift +++ b/Pods/SwiftTask/SwiftTask/_StateMachine.swift @@ -30,10 +30,10 @@ internal class _StateMachine /// wrapper closure for `_initClosure` to invoke only once when started `.Running`, /// and will be set to `nil` afterward - internal var initResumeClosure: _Atomic<(Void -> Void)?> = _Atomic(nil) + internal var initResumeClosure: _Atomic<(() -> Void)?> = _Atomic(nil) private lazy var _progressTupleHandlers = _Handlers() - private lazy var _completionHandlers = _Handlers Void>() + private lazy var _completionHandlers = _Handlers<() -> Void>() private var _lock = _RecursiveLock() @@ -43,7 +43,7 @@ internal class _StateMachine self.state = _Atomic(paused ? .Paused : .Running) } - internal func addProgressTupleHandler(inout token: _HandlerToken?, _ progressTupleHandler: ProgressTupleHandler) -> Bool + @discardableResult internal func addProgressTupleHandler(_ token: inout _HandlerToken?, _ progressTupleHandler: @escaping ProgressTupleHandler) -> Bool { self._lock.lock() defer { self._lock.unlock() } @@ -57,7 +57,7 @@ internal class _StateMachine } } - internal func removeProgressTupleHandler(handlerToken: _HandlerToken?) -> Bool + @discardableResult internal func removeProgressTupleHandler(_ handlerToken: _HandlerToken?) -> Bool { self._lock.lock() defer { self._lock.unlock() } @@ -71,7 +71,7 @@ internal class _StateMachine } } - internal func addCompletionHandler(inout token: _HandlerToken?, _ completionHandler: Void -> Void) -> Bool + @discardableResult internal func addCompletionHandler(_ token: inout _HandlerToken?, _ completionHandler: @escaping () -> Void) -> Bool { self._lock.lock() defer { self._lock.unlock() } @@ -85,7 +85,7 @@ internal class _StateMachine } } - internal func removeCompletionHandler(handlerToken: _HandlerToken?) -> Bool + @discardableResult internal func removeCompletionHandler(_ handlerToken: _HandlerToken?) -> Bool { self._lock.lock() defer { self._lock.unlock() } @@ -99,7 +99,7 @@ internal class _StateMachine } } - internal func handleProgress(progress: Progress) + internal func handleProgress(_ progress: Progress) { self._lock.lock() defer { self._lock.unlock() } @@ -119,7 +119,7 @@ internal class _StateMachine } } - internal func handleFulfill(value: Value) + internal func handleFulfill(_ value: Value) { self._lock.lock() defer { self._lock.unlock() } @@ -131,7 +131,7 @@ internal class _StateMachine } } - internal func handleRejectInfo(errorInfo: ErrorInfo) + internal func handleRejectInfo(_ errorInfo: ErrorInfo) { self._lock.lock() defer { self._lock.unlock() } @@ -203,7 +203,7 @@ internal class _StateMachine } } - internal func handleCancel(error: Error? = nil) -> Bool + internal func handleCancel(_ error: Error? = nil) -> Bool { self._lock.lock() defer { self._lock.unlock() } @@ -244,14 +244,14 @@ internal struct _HandlerToken internal let key: Int } -internal struct _Handlers: SequenceType +internal struct _Handlers: Sequence { internal typealias KeyValue = (key: Int, value: T) private var currentKey: Int = 0 private var elements = [KeyValue]() - internal mutating func append(value: T) -> _HandlerToken + internal mutating func append(_ value: T) -> _HandlerToken { self.currentKey = self.currentKey &+ 1 @@ -260,11 +260,11 @@ internal struct _Handlers: SequenceType return _HandlerToken(key: self.currentKey) } - internal mutating func remove(token: _HandlerToken) -> T? + internal mutating func remove(_ token: _HandlerToken) -> T? { for i in 0..: SequenceType internal mutating func removeAll(keepCapacity: Bool = false) { - self.elements.removeAll(keepCapacity: keepCapacity) + self.elements.removeAll(keepingCapacity: keepCapacity) } - internal func generate() -> AnyGenerator + internal func makeIterator() -> AnyIterator { - return AnyGenerator(self.elements.map { $0.value }.generate()) + return AnyIterator(self.elements.map { $0.value }.makeIterator()) } -} \ No newline at end of file +} diff --git a/Pods/Target Support Files/Alamofire/Alamofire-dummy.m b/Pods/Target Support Files/Alamofire/Alamofire-dummy.m new file mode 100644 index 0000000..a6c4594 --- /dev/null +++ b/Pods/Target Support Files/Alamofire/Alamofire-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Alamofire : NSObject +@end +@implementation PodsDummy_Alamofire +@end diff --git a/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch b/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h new file mode 100644 index 0000000..6b71676 --- /dev/null +++ b/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h @@ -0,0 +1,6 @@ +#import + + +FOUNDATION_EXPORT double AlamofireVersionNumber; +FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; + diff --git a/Pods/Target Support Files/Alamofire/Alamofire.modulemap b/Pods/Target Support Files/Alamofire/Alamofire.modulemap new file mode 100644 index 0000000..d1f125f --- /dev/null +++ b/Pods/Target Support Files/Alamofire/Alamofire.modulemap @@ -0,0 +1,6 @@ +framework module Alamofire { + umbrella header "Alamofire-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Alamofire/Alamofire.xcconfig b/Pods/Target Support Files/Alamofire/Alamofire.xcconfig new file mode 100644 index 0000000..ca4fab3 --- /dev/null +++ b/Pods/Target Support Files/Alamofire/Alamofire.xcconfig @@ -0,0 +1,9 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Alamofire +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" "-suppress-warnings" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/Alamofire/Info.plist b/Pods/Target Support Files/Alamofire/Info.plist new file mode 100644 index 0000000..3424ca6 --- /dev/null +++ b/Pods/Target Support Files/Alamofire/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 4.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Astro/Astro-dummy.m b/Pods/Target Support Files/Astro/Astro-dummy.m new file mode 100644 index 0000000..8f65378 --- /dev/null +++ b/Pods/Target Support Files/Astro/Astro-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Astro : NSObject +@end +@implementation PodsDummy_Astro +@end diff --git a/Pods/Target Support Files/Astro/Astro-prefix.pch b/Pods/Target Support Files/Astro/Astro-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/Astro/Astro-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/Astro/Astro-umbrella.h b/Pods/Target Support Files/Astro/Astro-umbrella.h new file mode 100644 index 0000000..db9dc85 --- /dev/null +++ b/Pods/Target Support Files/Astro/Astro-umbrella.h @@ -0,0 +1,6 @@ +#import + + +FOUNDATION_EXPORT double AstroVersionNumber; +FOUNDATION_EXPORT const unsigned char AstroVersionString[]; + diff --git a/Pods/Target Support Files/Astro/Astro.modulemap b/Pods/Target Support Files/Astro/Astro.modulemap new file mode 100644 index 0000000..811a32e --- /dev/null +++ b/Pods/Target Support Files/Astro/Astro.modulemap @@ -0,0 +1,6 @@ +framework module Astro { + umbrella header "Astro-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Astro/Astro.xcconfig b/Pods/Target Support Files/Astro/Astro.xcconfig new file mode 100644 index 0000000..78b63fb --- /dev/null +++ b/Pods/Target Support Files/Astro/Astro.xcconfig @@ -0,0 +1,12 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Astro +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Freddy" "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_LDFLAGS = -framework "UIKit" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" "-suppress-warnings" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +SWIFT_VERSION = 3.0 diff --git a/Pods/Target Support Files/Astro/Info.plist b/Pods/Target Support Files/Astro/Info.plist new file mode 100644 index 0000000..0a12077 --- /dev/null +++ b/Pods/Target Support Files/Astro/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/Pods/Target Support Files/Freddy/Freddy-dummy.m b/Pods/Target Support Files/Freddy/Freddy-dummy.m new file mode 100644 index 0000000..49ba8f5 --- /dev/null +++ b/Pods/Target Support Files/Freddy/Freddy-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Freddy : NSObject +@end +@implementation PodsDummy_Freddy +@end diff --git a/Pods/Target Support Files/Freddy/Freddy-prefix.pch b/Pods/Target Support Files/Freddy/Freddy-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/Freddy/Freddy-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/Freddy/Freddy-umbrella.h b/Pods/Target Support Files/Freddy/Freddy-umbrella.h new file mode 100644 index 0000000..7e27ee2 --- /dev/null +++ b/Pods/Target Support Files/Freddy/Freddy-umbrella.h @@ -0,0 +1,7 @@ +#import + +#import "Freddy.h" + +FOUNDATION_EXPORT double FreddyVersionNumber; +FOUNDATION_EXPORT const unsigned char FreddyVersionString[]; + diff --git a/Pods/Target Support Files/Freddy/Freddy.modulemap b/Pods/Target Support Files/Freddy/Freddy.modulemap new file mode 100644 index 0000000..3a4c0c7 --- /dev/null +++ b/Pods/Target Support Files/Freddy/Freddy.modulemap @@ -0,0 +1,6 @@ +framework module Freddy { + umbrella header "Freddy-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Freddy/Freddy.xcconfig b/Pods/Target Support Files/Freddy/Freddy.xcconfig new file mode 100644 index 0000000..aed19dc --- /dev/null +++ b/Pods/Target Support Files/Freddy/Freddy.xcconfig @@ -0,0 +1,10 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Freddy +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" "-suppress-warnings" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +SWIFT_VERSION = 3.0 diff --git a/Pods/Target Support Files/Freddy/Info.plist b/Pods/Target Support Files/Freddy/Info.plist new file mode 100644 index 0000000..4522675 --- /dev/null +++ b/Pods/Target Support Files/Freddy/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Nimble/Info.plist b/Pods/Target Support Files/Nimble/Info.plist new file mode 100644 index 0000000..c26f36f --- /dev/null +++ b/Pods/Target Support Files/Nimble/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 4.1.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Nimble/Nimble-dummy.m b/Pods/Target Support Files/Nimble/Nimble-dummy.m new file mode 100644 index 0000000..e8177ab --- /dev/null +++ b/Pods/Target Support Files/Nimble/Nimble-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Nimble : NSObject +@end +@implementation PodsDummy_Nimble +@end diff --git a/Pods/Target Support Files/Nimble/Nimble-prefix.pch b/Pods/Target Support Files/Nimble/Nimble-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/Nimble/Nimble-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/Nimble/Nimble-umbrella.h b/Pods/Target Support Files/Nimble/Nimble-umbrella.h new file mode 100644 index 0000000..3701312 --- /dev/null +++ b/Pods/Target Support Files/Nimble/Nimble-umbrella.h @@ -0,0 +1,10 @@ +#import + +#import "DSL.h" +#import "NMBExceptionCapture.h" +#import "NMBStringify.h" +#import "Nimble.h" + +FOUNDATION_EXPORT double NimbleVersionNumber; +FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; + diff --git a/Pods/Target Support Files/Nimble/Nimble.modulemap b/Pods/Target Support Files/Nimble/Nimble.modulemap new file mode 100644 index 0000000..6f77009 --- /dev/null +++ b/Pods/Target Support Files/Nimble/Nimble.modulemap @@ -0,0 +1,6 @@ +framework module Nimble { + umbrella header "Nimble-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Nimble/Nimble.xcconfig b/Pods/Target Support Files/Nimble/Nimble.xcconfig new file mode 100644 index 0000000..4ea179b --- /dev/null +++ b/Pods/Target Support Files/Nimble/Nimble.xcconfig @@ -0,0 +1,12 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Nimble +ENABLE_BITCODE = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_LDFLAGS = -weak-lswiftXCTest -weak_framework "XCTest" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" "-suppress-warnings" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/Nocilla/Info.plist b/Pods/Target Support Files/Nocilla/Info.plist new file mode 100644 index 0000000..1b8f7d0 --- /dev/null +++ b/Pods/Target Support Files/Nocilla/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.11.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Nocilla/Nocilla-dummy.m b/Pods/Target Support Files/Nocilla/Nocilla-dummy.m new file mode 100644 index 0000000..bf67e7a --- /dev/null +++ b/Pods/Target Support Files/Nocilla/Nocilla-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Nocilla : NSObject +@end +@implementation PodsDummy_Nocilla +@end diff --git a/Pods/Target Support Files/Nocilla/Nocilla-prefix.pch b/Pods/Target Support Files/Nocilla/Nocilla-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/Nocilla/Nocilla-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/Nocilla/Nocilla-umbrella.h b/Pods/Target Support Files/Nocilla/Nocilla-umbrella.h new file mode 100644 index 0000000..e8b33f7 --- /dev/null +++ b/Pods/Target Support Files/Nocilla/Nocilla-umbrella.h @@ -0,0 +1,18 @@ +#import + +#import "NSData+Nocilla.h" +#import "NSString+Nocilla.h" +#import "LSStubRequestDSL.h" +#import "LSStubResponseDSL.h" +#import "LSNocilla.h" +#import "LSMatcheable.h" +#import "LSMatcher.h" +#import "NSData+Matcheable.h" +#import "NSRegularExpression+Matcheable.h" +#import "NSString+Matcheable.h" +#import "LSHTTPBody.h" +#import "Nocilla.h" + +FOUNDATION_EXPORT double NocillaVersionNumber; +FOUNDATION_EXPORT const unsigned char NocillaVersionString[]; + diff --git a/Pods/Target Support Files/Nocilla/Nocilla.modulemap b/Pods/Target Support Files/Nocilla/Nocilla.modulemap new file mode 100644 index 0000000..01df4e2 --- /dev/null +++ b/Pods/Target Support Files/Nocilla/Nocilla.modulemap @@ -0,0 +1,6 @@ +framework module Nocilla { + umbrella header "Nocilla-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Nocilla/Nocilla.xcconfig b/Pods/Target Support Files/Nocilla/Nocilla.xcconfig new file mode 100644 index 0000000..2598e3c --- /dev/null +++ b/Pods/Target Support Files/Nocilla/Nocilla.xcconfig @@ -0,0 +1,9 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Nocilla +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_LDFLAGS = -framework "CFNetwork" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/Pods-Astro/Info.plist b/Pods/Target Support Files/Pods-Astro/Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Pods/Target Support Files/Pods-Astro/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro-acknowledgements.markdown b/Pods/Target Support Files/Pods-Astro/Pods-Astro-acknowledgements.markdown new file mode 100644 index 0000000..c35eb93 --- /dev/null +++ b/Pods/Target Support Files/Pods-Astro/Pods-Astro-acknowledgements.markdown @@ -0,0 +1,85 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## Alamofire + +Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +## Astro + +Copyright (c) 2015 Robots and Pencils, 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: +Neither the name of the Robots and Pencils, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +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. + + +## Freddy + +The MIT License (MIT) + +Copyright (c) 2015 Big Nerd Ranch Inc + +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. + + +## SwiftTask + +The MIT License (MIT) + +Copyright (c) 2014 Yasuhiro Inami + +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. + +Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro-acknowledgements.plist b/Pods/Target Support Files/Pods-Astro/Pods-Astro-acknowledgements.plist new file mode 100644 index 0000000..2e62dc2 --- /dev/null +++ b/Pods/Target Support Files/Pods-Astro/Pods-Astro-acknowledgements.plist @@ -0,0 +1,135 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + License + MIT + Title + Alamofire + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2015 Robots and Pencils, 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: +Neither the name of the Robots and Pencils, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +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 + Astro + Type + PSGroupSpecifier + + + FooterText + The MIT License (MIT) + +Copyright (c) 2015 Big Nerd Ranch Inc + +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 + Freddy + Type + PSGroupSpecifier + + + FooterText + The MIT License (MIT) + +Copyright (c) 2014 Yasuhiro Inami + +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 + SwiftTask + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro-dummy.m b/Pods/Target Support Files/Pods-Astro/Pods-Astro-dummy.m new file mode 100644 index 0000000..566313e --- /dev/null +++ b/Pods/Target Support Files/Pods-Astro/Pods-Astro-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_Astro : NSObject +@end +@implementation PodsDummy_Pods_Astro +@end diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro-resources.sh b/Pods/Target Support Files/Pods-Astro/Pods-Astro-resources.sh new file mode 100755 index 0000000..0a15615 --- /dev/null +++ b/Pods/Target Support Files/Pods-Astro/Pods-Astro-resources.sh @@ -0,0 +1,102 @@ +#!/bin/sh +set -e + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +realpath() { + DIRECTORY="$(cd "${1%/*}" && pwd)" + FILENAME="${1##*/}" + echo "$DIRECTORY/$FILENAME" +} + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE=$(realpath "$RESOURCE_PATH") + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "`realpath $PODS_ROOT`*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro-umbrella.h b/Pods/Target Support Files/Pods-Astro/Pods-Astro-umbrella.h new file mode 100644 index 0000000..80a9e38 --- /dev/null +++ b/Pods/Target Support Files/Pods-Astro/Pods-Astro-umbrella.h @@ -0,0 +1,6 @@ +#import + + +FOUNDATION_EXPORT double Pods_AstroVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_AstroVersionString[]; + diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro.debug.xcconfig b/Pods/Target Support Files/Pods-Astro/Pods-Astro.debug.xcconfig new file mode 100644 index 0000000..95ee33b --- /dev/null +++ b/Pods/Target Support Files/Pods-Astro/Pods-Astro.debug.xcconfig @@ -0,0 +1,10 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Astro" "$PODS_CONFIGURATION_BUILD_DIR/Freddy" "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask" +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/Astro/Astro.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Freddy/Freddy.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask/SwiftTask.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Astro" -framework "Freddy" -framework "SwiftTask" +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 diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro.modulemap b/Pods/Target Support Files/Pods-Astro/Pods-Astro.modulemap new file mode 100644 index 0000000..950a0e4 --- /dev/null +++ b/Pods/Target Support Files/Pods-Astro/Pods-Astro.modulemap @@ -0,0 +1,6 @@ +framework module Pods_Astro { + umbrella header "Pods-Astro-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Pods-Astro/Pods-Astro.release.xcconfig b/Pods/Target Support Files/Pods-Astro/Pods-Astro.release.xcconfig new file mode 100644 index 0000000..95ee33b --- /dev/null +++ b/Pods/Target Support Files/Pods-Astro/Pods-Astro.release.xcconfig @@ -0,0 +1,10 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Astro" "$PODS_CONFIGURATION_BUILD_DIR/Freddy" "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask" +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/Astro/Astro.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Freddy/Freddy.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask/SwiftTask.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Astro" -framework "Freddy" -framework "SwiftTask" +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 diff --git a/Pods/Target Support Files/Pods-AstroTests/Info.plist b/Pods/Target Support Files/Pods-AstroTests/Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Pods/Target Support Files/Pods-AstroTests/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-acknowledgements.markdown b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-acknowledgements.markdown new file mode 100644 index 0000000..d2e4201 --- /dev/null +++ b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-acknowledgements.markdown @@ -0,0 +1,519 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## Nimble + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014 Quick Team + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +## Nocilla + +Copyright (c) 2012 Luis Solano Bonet +MIT License + +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. + +## Quick + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014, Quick Team + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +## Alamofire + +Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +## Astro + +Copyright (c) 2015 Robots and Pencils, 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: +Neither the name of the Robots and Pencils, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +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. + + +## Freddy + +The MIT License (MIT) + +Copyright (c) 2015 Big Nerd Ranch Inc + +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. + + +## SwiftTask + +The MIT License (MIT) + +Copyright (c) 2014 Yasuhiro Inami + +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. + +Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-acknowledgements.plist b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-acknowledgements.plist new file mode 100644 index 0000000..8866996 --- /dev/null +++ b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-acknowledgements.plist @@ -0,0 +1,587 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014 Quick Team + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + License + Apache 2.0 + Title + Nimble + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2012 Luis Solano Bonet +MIT License + +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 + Nocilla + Type + PSGroupSpecifier + + + FooterText + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014, Quick Team + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + License + Apache 2.0 + Title + Quick + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + License + MIT + Title + Alamofire + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2015 Robots and Pencils, 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: +Neither the name of the Robots and Pencils, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +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 + Astro + Type + PSGroupSpecifier + + + FooterText + The MIT License (MIT) + +Copyright (c) 2015 Big Nerd Ranch Inc + +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 + Freddy + Type + PSGroupSpecifier + + + FooterText + The MIT License (MIT) + +Copyright (c) 2014 Yasuhiro Inami + +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 + SwiftTask + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-dummy.m b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-dummy.m new file mode 100644 index 0000000..d3b668e --- /dev/null +++ b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_AstroTests : NSObject +@end +@implementation PodsDummy_Pods_AstroTests +@end diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-frameworks.sh b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-frameworks.sh new file mode 100755 index 0000000..f1073c2 --- /dev/null +++ b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-frameworks.sh @@ -0,0 +1,103 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # use filter instead of exclude so missing patterns dont' throw errors + echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" + /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "$BUILT_PRODUCTS_DIR/Nimble/Nimble.framework" + install_framework "$BUILT_PRODUCTS_DIR/Nocilla/Nocilla.framework" + install_framework "$BUILT_PRODUCTS_DIR/Quick/Quick.framework" + install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" + install_framework "$BUILT_PRODUCTS_DIR/Astro/Astro.framework" + install_framework "$BUILT_PRODUCTS_DIR/Freddy/Freddy.framework" + install_framework "$BUILT_PRODUCTS_DIR/SwiftTask/SwiftTask.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "$BUILT_PRODUCTS_DIR/Nimble/Nimble.framework" + install_framework "$BUILT_PRODUCTS_DIR/Nocilla/Nocilla.framework" + install_framework "$BUILT_PRODUCTS_DIR/Quick/Quick.framework" + install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" + install_framework "$BUILT_PRODUCTS_DIR/Astro/Astro.framework" + install_framework "$BUILT_PRODUCTS_DIR/Freddy/Freddy.framework" + install_framework "$BUILT_PRODUCTS_DIR/SwiftTask/SwiftTask.framework" +fi diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-resources.sh b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-resources.sh new file mode 100755 index 0000000..0a15615 --- /dev/null +++ b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-resources.sh @@ -0,0 +1,102 @@ +#!/bin/sh +set -e + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +realpath() { + DIRECTORY="$(cd "${1%/*}" && pwd)" + FILENAME="${1##*/}" + echo "$DIRECTORY/$FILENAME" +} + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE=$(realpath "$RESOURCE_PATH") + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "`realpath $PODS_ROOT`*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-umbrella.h b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-umbrella.h new file mode 100644 index 0000000..8d80a8c --- /dev/null +++ b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests-umbrella.h @@ -0,0 +1,6 @@ +#import + + +FOUNDATION_EXPORT double Pods_AstroTestsVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_AstroTestsVersionString[]; + diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.debug.xcconfig b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.debug.xcconfig new file mode 100644 index 0000000..218bd31 --- /dev/null +++ b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.debug.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Astro" "$PODS_CONFIGURATION_BUILD_DIR/Freddy" "$PODS_CONFIGURATION_BUILD_DIR/Nimble" "$PODS_CONFIGURATION_BUILD_DIR/Nocilla" "$PODS_CONFIGURATION_BUILD_DIR/Quick" "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask" +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/Astro/Astro.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Freddy/Freddy.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Nimble/Nimble.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Nocilla/Nocilla.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Quick/Quick.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask/SwiftTask.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Astro" -framework "Freddy" -framework "Nimble" -framework "Nocilla" -framework "Quick" -framework "SwiftTask" +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 diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.modulemap b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.modulemap new file mode 100644 index 0000000..9495844 --- /dev/null +++ b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.modulemap @@ -0,0 +1,6 @@ +framework module Pods_AstroTests { + umbrella header "Pods-AstroTests-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.release.xcconfig b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.release.xcconfig new file mode 100644 index 0000000..218bd31 --- /dev/null +++ b/Pods/Target Support Files/Pods-AstroTests/Pods-AstroTests.release.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Astro" "$PODS_CONFIGURATION_BUILD_DIR/Freddy" "$PODS_CONFIGURATION_BUILD_DIR/Nimble" "$PODS_CONFIGURATION_BUILD_DIR/Nocilla" "$PODS_CONFIGURATION_BUILD_DIR/Quick" "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask" +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/Astro/Astro.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Freddy/Freddy.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Nimble/Nimble.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Nocilla/Nocilla.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Quick/Quick.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftTask/SwiftTask.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Astro" -framework "Freddy" -framework "Nimble" -framework "Nocilla" -framework "Quick" -framework "SwiftTask" +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 diff --git a/Pods/Target Support Files/Quick/Info.plist b/Pods/Target Support Files/Quick/Info.plist new file mode 100644 index 0000000..b8a90bb --- /dev/null +++ b/Pods/Target Support Files/Quick/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.9.3 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Quick/Quick-dummy.m b/Pods/Target Support Files/Quick/Quick-dummy.m new file mode 100644 index 0000000..54d7dc0 --- /dev/null +++ b/Pods/Target Support Files/Quick/Quick-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Quick : NSObject +@end +@implementation PodsDummy_Quick +@end diff --git a/Pods/Target Support Files/Quick/Quick-prefix.pch b/Pods/Target Support Files/Quick/Quick-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/Quick/Quick-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/Quick/Quick-umbrella.h b/Pods/Target Support Files/Quick/Quick-umbrella.h new file mode 100644 index 0000000..c1aab14 --- /dev/null +++ b/Pods/Target Support Files/Quick/Quick-umbrella.h @@ -0,0 +1,10 @@ +#import + +#import "QuickConfiguration.h" +#import "QCKDSL.h" +#import "Quick.h" +#import "QuickSpec.h" + +FOUNDATION_EXPORT double QuickVersionNumber; +FOUNDATION_EXPORT const unsigned char QuickVersionString[]; + diff --git a/Pods/Target Support Files/Quick/Quick.modulemap b/Pods/Target Support Files/Quick/Quick.modulemap new file mode 100644 index 0000000..1d12b21 --- /dev/null +++ b/Pods/Target Support Files/Quick/Quick.modulemap @@ -0,0 +1,6 @@ +framework module Quick { + umbrella header "Quick-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Quick/Quick.xcconfig b/Pods/Target Support Files/Quick/Quick.xcconfig new file mode 100644 index 0000000..cd64dc1 --- /dev/null +++ b/Pods/Target Support Files/Quick/Quick.xcconfig @@ -0,0 +1,12 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Quick +ENABLE_BITCODE = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_LDFLAGS = -framework "XCTest" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" "-suppress-warnings" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/SwiftTask/Info.plist b/Pods/Target Support Files/SwiftTask/Info.plist new file mode 100644 index 0000000..e2771ff --- /dev/null +++ b/Pods/Target Support Files/SwiftTask/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 5.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/SwiftTask/SwiftTask-dummy.m b/Pods/Target Support Files/SwiftTask/SwiftTask-dummy.m new file mode 100644 index 0000000..05ecdf0 --- /dev/null +++ b/Pods/Target Support Files/SwiftTask/SwiftTask-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_SwiftTask : NSObject +@end +@implementation PodsDummy_SwiftTask +@end diff --git a/Pods/Target Support Files/SwiftTask/SwiftTask-prefix.pch b/Pods/Target Support Files/SwiftTask/SwiftTask-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/SwiftTask/SwiftTask-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/SwiftTask/SwiftTask-umbrella.h b/Pods/Target Support Files/SwiftTask/SwiftTask-umbrella.h new file mode 100644 index 0000000..5c4a480 --- /dev/null +++ b/Pods/Target Support Files/SwiftTask/SwiftTask-umbrella.h @@ -0,0 +1,7 @@ +#import + +#import "SwiftTask.h" + +FOUNDATION_EXPORT double SwiftTaskVersionNumber; +FOUNDATION_EXPORT const unsigned char SwiftTaskVersionString[]; + diff --git a/Pods/Target Support Files/SwiftTask/SwiftTask.modulemap b/Pods/Target Support Files/SwiftTask/SwiftTask.modulemap new file mode 100644 index 0000000..d539e70 --- /dev/null +++ b/Pods/Target Support Files/SwiftTask/SwiftTask.modulemap @@ -0,0 +1,6 @@ +framework module SwiftTask { + umbrella header "SwiftTask-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/SwiftTask/SwiftTask.xcconfig b/Pods/Target Support Files/SwiftTask/SwiftTask.xcconfig new file mode 100644 index 0000000..12b00a3 --- /dev/null +++ b/Pods/Target Support Files/SwiftTask/SwiftTask.xcconfig @@ -0,0 +1,9 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SwiftTask +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" "-suppress-warnings" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES From dae023a1edf6242f03eac2a1090964c0acf0caf0 Mon Sep 17 00:00:00 2001 From: stephengazzard Date: Tue, 25 Oct 2016 11:56:12 -0600 Subject: [PATCH 03/11] Swift 3.0 transition progress --- Astro/Networking/NetworkService.swift | 61 ++++++++++----------- Astro/Networking/NetworkServiceLogger.swift | 18 +++--- Astro/Networking/Route.swift | 50 ++++++++++------- Astro/Security/KeychainAccess.swift | 4 +- Astro/UI/ReusableView.swift | 2 +- 5 files changed, 71 insertions(+), 64 deletions(-) diff --git a/Astro/Networking/NetworkService.swift b/Astro/Networking/NetworkService.swift index 78dde97..c9bfb4d 100644 --- a/Astro/Networking/NetworkService.swift +++ b/Astro/Networking/NetworkService.swift @@ -16,7 +16,7 @@ import Freddy /// Error Type. public struct NetworkError { - public let response: Response? + public let response: DataResponse? public let error: Error public var statusCode: HTTPStatusCode? { @@ -29,7 +29,7 @@ public struct NetworkError { return try? JSON(data: data) } - public init(response: Response? = nil, error: Error) { + public init(response: DataResponse? = nil, error: Error) { self.response = response self.error = error } @@ -37,7 +37,7 @@ public struct NetworkError { /// Success Type. public struct ResponseValue { - public let response: Response? + public let response: DataResponse? public let value: T public var statusCode: HTTPStatusCode? { @@ -45,7 +45,7 @@ public struct ResponseValue { return HTTPStatusCode(intValue: response.statusCode) } - public init(response: Response? = nil, value: T) { + public init(response: DataResponse? = nil, value: T) { self.response = response self.value = value } @@ -146,9 +146,9 @@ public protocol NetworkServiceType { Performs the specified request for some data. - parameter URLRequest: the request - - returns: A task for NSData + - returns: A task for Data */ - func requestData(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> + func requestData(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> } /// Convenience methods without underlying NSHTTPURLResponse @@ -193,7 +193,7 @@ public extension NetworkServiceType { return requestJSON(URLRequest).success { $0.value } } - func requestData(_ URLRequest: URLRequestConvertible) -> Task { + func requestData(_ URLRequest: URLRequestConvertible) -> Task { return self.requestData(URLRequest).success { return $0.value } } } @@ -212,8 +212,8 @@ open class NetworkService: NetworkServiceType { public convenience init() { let requestManager: Alamofire.SessionManager = { - let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() - configuration.HTTPAdditionalHeaders = Alamofire.SessionManager.defaultHTTPHeaders + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = Alamofire.SessionManager.defaultHTTPHeaders return Alamofire.SessionManager(configuration: configuration) }() @@ -283,8 +283,8 @@ open class NetworkService: NetworkServiceType { open func requestJSONDictionary(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> { return requestJSON(URLRequest).success { (value: ResponseValue) -> Task, NetworkError> in let json = value.value - guard case let JSON.Dictionary(dictionary) = json else { - let error = JSON.Error.ValueNotConvertible(value: json, to: Swift.Dictionary) + guard case let JSON.dictionary(dictionary) = json else { + let error = JSON.Error.valueNotConvertible(value: json, to: Swift.Dictionary) return Task, NetworkError>(error: NetworkError(response: value.response, error: error)) } return Task(value: ResponseValue(response: value.response, value: dictionary)) @@ -294,8 +294,8 @@ open class NetworkService: NetworkServiceType { open func requestJSONArray(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> { return requestJSON(URLRequest).success { (value: ResponseValue) -> Task, NetworkError> in let json = value.value - guard case let JSON.Array(array) = json else { - let error = JSON.Error.ValueNotConvertible(value: json, to: Swift.Array) + guard case let JSON.array(array) = json else { + let error = JSON.Error.valueNotConvertible(value: json, to: Swift.Array) return Task, NetworkError>(error: NetworkError(response: value.response, error: error)) } return Task(value: ResponseValue(response: value.response, value: array)) @@ -307,8 +307,8 @@ open class NetworkService: NetworkServiceType { guard let json = value.value else { return Task(value: ResponseValue(response: value.response, value: nil)) } - guard case let JSON.Array(array) = json else { - let error = JSON.Error.ValueNotConvertible(value: json, to: Swift.Array) + guard case let JSON.array(array) = json else { + let error = JSON.Error.valueNotConvertible(value: json, to: Swift.Array) return Task, NetworkError>(error: NetworkError(response: value.response, error: error)) } return Task(value: ResponseValue(response: value.response, value: array)) @@ -328,7 +328,7 @@ open class NetworkService: NetworkServiceType { open func requestJSON(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> { return requestData(URLRequest).success { value -> Task, NetworkError> in - if value.value.length == 0 { + if value.value.count == 0 { return Task(value: ResponseValue(response: value.response, value: nil)) } do { @@ -340,21 +340,21 @@ open class NetworkService: NetworkServiceType { } } - open func requestData(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> { + open func requestData(_ URLRequest: URLRequestConvertible) -> Task, NetworkError> { return Task { [weak self] progress, fulfill, reject, configure in - NetworkService.postNotification(NetworkService.Notifications.DidRequest, request: URLRequest) + try? NetworkService.postNotification(NetworkService.Notifications.DidRequest, request: URLRequest) let request = self?.requestManager.request(URLRequest) - .progress { bytesRead, totalBytesRead, totalExpectedBytes -> Void in - progress(Float(totalBytesRead) / Float(totalExpectedBytes)) + .downloadProgress { downloadProgress in + progress(Float(downloadProgress.fractionCompleted)) } .validate() // Covers error status code and content type mismatch .responseData { response in - NetworkService.postNotification(NetworkService.Notifications.DidReceive, request: URLRequest, response: response) + try? NetworkService.postNotification(NetworkService.Notifications.DidReceive, request: URLRequest, response: response) guard let data = response.result.value , response.result.isSuccess else { // We should always have an error in the non success case but use AssertionError to avoid a bang (!) - let error: ErrorType = response.result.error ?? AssertionError() + let error: Error = response.result.error ?? AssertionError() reject(NetworkError(response: response, error: error)) return } @@ -400,24 +400,24 @@ public extension NetworkService { /** This is a box/wrapper for the request and response because we can't directly add the response to the UserInfo dict (since it's not an NSObject) */ - open class NotificationInfo: NSObject { + public class NotificationInfo: NSObject { /** The request that was performed by the NetworkService */ - open let request: NSMutableURLRequest + open let request: URLRequest /** The response that is received in response to `request`. This value will only have a value for the `Notifications.DidReceive` notification. */ - open let response: Response? + open let response: DataResponse? /** Creates an instance with the specified request and optional response. - parameter request: the request being performed by the NetworkService - parameter response: an option response received by the NetworkService */ - fileprivate init(request: URLRequestConvertible, response: Response? = nil) { - self.request = request.URLRequest + fileprivate init(request: URLRequestConvertible, response: DataResponse? = nil) throws { + self.request = try request.asURLRequest() self.response = response } } @@ -428,10 +428,9 @@ public extension NetworkService { - parameter request: The request made by the network service - parameter response: The response received by the network service. This will only have a value for Notifications.DidReceive */ - fileprivate static func postNotification(_ notificationName: String, request: URLRequestConvertible, response: Response? = nil) { - let info = NotificationInfo(request: request, response: response) - - NotificationCenter.defaultCenter().postNotificationName(notificationName, object: self, userInfo: [NetworkService.NotificationInfoKey: info]) + fileprivate static func postNotification(_ notificationName: String, request: URLRequestConvertible, response: DataResponse? = nil) throws { + let info = try NotificationInfo(request: request, response: response) + NotificationCenter.default.post(name: Notification.Name(notificationName), object: self, userInfo: [NetworkService.NotificationInfoKey: info]) } } diff --git a/Astro/Networking/NetworkServiceLogger.swift b/Astro/Networking/NetworkServiceLogger.swift index 591f609..e45e3ed 100644 --- a/Astro/Networking/NetworkServiceLogger.swift +++ b/Astro/Networking/NetworkServiceLogger.swift @@ -70,9 +70,9 @@ open class NetworkServiceLogger: NSObject { guard let response = notification.info?.response else { return } switch response.result { - case .Failure(let error): + case .failure(let error): Log.error(response.debugDescription(headers: includeHeaders, body: includeBody) + ": \(error)") - case .Success: + case .success: Log.info(response.debugDescription(headers: includeHeaders, body: includeBody)) } } @@ -87,7 +87,7 @@ private extension Notification { } } -private extension NSMutableURLRequest { +private extension URLRequest { /** Private extension for formatting a request into a debug string. - parameter headers: option to include request headers in the output @@ -117,7 +117,7 @@ private extension NSMutableURLRequest { } } -private extension Response { +private extension DataResponse { /** Private extension for formatting a response into a debug string. - parameter headers: option to include response headers in the output @@ -127,22 +127,22 @@ private extension Response { func debugDescription(headers includeHeaders: Bool = false, body includeBody: Bool = false) -> String { let statusCode = HTTPStatusCode(intValue: response?.statusCode ?? 0) let durationMillis = Int(timeline.totalDuration * 1000) - let url = request?.URL?.absoluteString ?? "" + let url = request?.url?.absoluteString ?? "" let status = statusCode.flatMap { "\($0.rawValue)" } ?? "" var result = "[\(durationMillis)ms] \(status) \(url)" if includeHeaders || statusCode?.isError == true { let headers = response?.allHeaderFields.map { "\($0): \($1)" } if let headers = headers { - result.appendContentsOf(":\n\(headers)\n") + result.append(":\n\(headers)\n") } } if includeBody || statusCode?.isError == true { if let bodyData = self.data, - let body = String(data: bodyData, encoding: NSUTF8StringEncoding) { - result.appendContentsOf("\n") - result.appendContentsOf(body) + let body = String(data: bodyData, encoding: String.Encoding.utf8) { + result.append("\n") + result.append(body) } } return result diff --git a/Astro/Networking/Route.swift b/Astro/Networking/Route.swift index bf4d769..7565d9b 100644 --- a/Astro/Networking/Route.swift +++ b/Astro/Networking/Route.swift @@ -16,16 +16,16 @@ import Freddy Route provides a simple abstraction for working with NSURLRequests. Recommended approach is to add extensions to Route to add a default baseURL value and static functions for your specific API. */ public struct Route: URLRequestConvertible { - public let URL: NSURL - public let method: Alamofire.Method + public let URL: URL + public let method: Alamofire.HTTPMethod public let parameters: RequestParameters? public let additionalHeaders: [String: String] - public init(URL: NSURL, method: Alamofire.Method = .get, JSON: Freddy.JSON, additionalHeaders: [String: String] = [:]) { - self.init(URL: URL, method: method, parameters: RequestParameters.JSON(parameters: JSON), additionalHeaders: additionalHeaders) + public init(URL: URL, method: Alamofire.HTTPMethod = .get, JSON: Freddy.JSON, additionalHeaders: [String: String] = [:]) { + self.init(URL: URL, method: method, parameters: RequestParameters.json(parameters: JSON), additionalHeaders: additionalHeaders) } - public init(URL: NSURL, method: Alamofire.Method = .GET, parameters: RequestParameters? = nil, additionalHeaders: [String: String] = [:]) { + public init(URL: URL, method: Alamofire.HTTPMethod = .get, parameters: RequestParameters? = nil, additionalHeaders: [String: String] = [:]) { self.URL = URL self.method = method self.parameters = parameters @@ -34,9 +34,9 @@ public struct Route: URLRequestConvertible { // MARK: - URLRequestConvertible - public var URLRequest: NSMutableURLRequest { - var mutableURLRequest = NSMutableURLRequest(URL: self.URL) - mutableURLRequest.HTTPMethod = self.method.rawValue + public func asURLRequest() throws -> URLRequest { + var mutableURLRequest = URLRequest(url: self.URL) + mutableURLRequest.httpMethod = self.method.rawValue for (header, value) in self.additionalHeaders { mutableURLRequest.setValue(value, forHTTPHeaderField: header) @@ -52,10 +52,14 @@ public struct Route: URLRequestConvertible { extension Route: CustomStringConvertible { public var description: String { - let request = URLRequest - let method = request.HTTPMethod ?? "" - let url = request.URLString ?? "" - return "\(method) \(url)" + do { + let request = try asURLRequest() + let method = request.httpMethod ?? "" + let url = request.url?.absoluteString ?? "" + return "\(method) \(url)" + } catch { + return "" + } } } @@ -63,27 +67,31 @@ public enum RequestParameters { case json(parameters: Freddy.JSON) case dictionary(parameters: [String: AnyObject], parameterEncoding: Alamofire.ParameterEncoding) - public func encode(_ URLRequest: URLRequestConvertible) -> (NSMutableURLRequest, NSError?) { + public func encode(_ URLRequest: URLRequest) -> (URLRequest, NSError?) { switch self { - case .JSON(let parameters): - let mutableURLRequest = URLRequest.URLRequest + case .json(let parameters): + var mutableURLRequest = URLRequest var encodingError: NSError? = nil do { let data = try parameters.serialize() - if mutableURLRequest.valueForHTTPHeaderField("Content-Type") == nil { + if mutableURLRequest.value(forHTTPHeaderField: "Content-Type") == nil { mutableURLRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") } - mutableURLRequest.HTTPBody = data + mutableURLRequest.httpBody = data } catch { encodingError = error as NSError Log.error("Unable to encode JSON parameters: \(encodingError)") } return (mutableURLRequest, encodingError) - case .Dictionary(let parameters, let encoding): - return encoding.encode(URLRequest, parameters: parameters) + case .dictionary(let parameters, let encoding): + do { + return (try encoding.encode(URLRequest, with: parameters), nil) + } catch { + return (URLRequest, error as NSError) + } } } } @@ -95,7 +103,7 @@ public enum RequestParameters { */ public extension String { public func base64Encode() -> String { - let data = self.dataUsingEncoding(NSUTF8StringEncoding) - return data!.base64EncodedStringWithOptions(NSDataBase64EncodingOptions(rawValue: 0)) + let data = self.data(using: String.Encoding.utf8) + return data!.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0)) } } diff --git a/Astro/Security/KeychainAccess.swift b/Astro/Security/KeychainAccess.swift index 99a99db..e4872c1 100644 --- a/Astro/Security/KeychainAccess.swift +++ b/Astro/Security/KeychainAccess.swift @@ -178,7 +178,7 @@ open class KeychainAccess { } set { - self.putString(key, value: newValue) + _ = self.putString(key, value: newValue) } } @@ -188,7 +188,7 @@ open class KeychainAccess { } set { - self.put(key, data: newValue) + _ = self.put(key, data: newValue) } } diff --git a/Astro/UI/ReusableView.swift b/Astro/UI/ReusableView.swift index 37636cc..b826d20 100644 --- a/Astro/UI/ReusableView.swift +++ b/Astro/UI/ReusableView.swift @@ -28,6 +28,6 @@ public protocol ReusableView: class { */ public extension ReusableView where Self: UIView { static var defaultReuseIdentifier: String { - return String(describing: Self) + return String(describing: self) } } From 0ec3b2d6b645fc62bb7a5399dd224d3f9c114f35 Mon Sep 17 00:00:00 2001 From: stephengazzard Date: Tue, 25 Oct 2016 14:16:56 -0600 Subject: [PATCH 04/11] Update Quick/Nimble to support Swift 3 --- Podfile | 4 +- Podfile.lock | 16 +- Pods/Manifest.lock | 16 +- Pods/Nimble/README.md | 165 +- .../CwlCatchException/CwlCatchException.h | 30 + .../CwlCatchException/CwlCatchException.m | 35 + .../CwlCatchException/CwlCatchException.swift | 32 + .../CwlBadInstructionException.swift | 76 + .../CwlCatchBadInstruction.h | 61 + .../CwlCatchBadInstruction.m | 50 + .../CwlCatchBadInstruction.swift | 194 ++ .../CwlDarwinDefinitions.swift | 63 + .../CwlPreconditionTesting/mach_excServer.c | 537 ++++++ .../CwlPreconditionTesting/mach_excServer.h | 298 +++ .../Nimble/Adapters/AdapterProtocols.swift | 2 +- .../Nimble/Adapters/AssertionDispatcher.swift | 2 +- .../Nimble/Adapters/AssertionRecorder.swift | 8 +- .../{ObjectiveC => }/NMBExpectation.swift | 12 +- .../{ObjectiveC => }/NMBObjCMatcher.swift | 34 +- .../Nimble/Adapters/NimbleEnvironment.swift | 19 +- .../Nimble/Adapters/NimbleXCTestHandler.swift | 16 +- .../Sources/Nimble/Adapters/ObjectiveC/DSL.h | 145 -- .../Adapters/ObjectiveC/NMBExceptionCapture.h | 11 - Pods/Nimble/Sources/Nimble/DSL+Wait.swift | 59 +- Pods/Nimble/Sources/Nimble/DSL.swift | 28 +- Pods/Nimble/Sources/Nimble/Expectation.swift | 22 +- Pods/Nimble/Sources/Nimble/Expression.swift | 8 +- .../Sources/Nimble/FailureMessage.swift | 23 +- .../Sources/Nimble/Matchers/AllPass.swift | 86 +- .../Nimble/Matchers/AsyncMatcherWrapper.swift | 64 +- .../Sources/Nimble/Matchers/BeAKindOf.swift | 12 +- .../Nimble/Matchers/BeAnInstanceOf.swift | 14 +- .../Sources/Nimble/Matchers/BeCloseTo.swift | 30 +- .../Sources/Nimble/Matchers/BeEmpty.swift | 8 +- .../Nimble/Matchers/BeGreaterThan.swift | 13 +- .../Matchers/BeGreaterThanOrEqualTo.swift | 13 +- .../Nimble/Matchers/BeIdenticalTo.swift | 24 +- .../Sources/Nimble/Matchers/BeLessThan.swift | 15 +- .../Nimble/Matchers/BeLessThanOrEqual.swift | 13 +- .../Sources/Nimble/Matchers/BeLogical.swift | 106 +- .../Sources/Nimble/Matchers/BeginWith.swift | 28 +- .../Sources/Nimble/Matchers/Contain.swift | 30 +- .../Sources/Nimble/Matchers/EndWith.swift | 28 +- .../Sources/Nimble/Matchers/Equal.swift | 26 +- .../Sources/Nimble/Matchers/HaveCount.swift | 23 +- .../Sources/Nimble/Matchers/Match.swift | 10 +- .../Sources/Nimble/Matchers/MatchError.swift | 8 +- .../Sources/Nimble/Matchers/MatcherFunc.swift | 14 +- .../Nimble/Matchers/MatcherProtocols.swift | 80 +- .../Nimble/Matchers/PostNotification.swift | 64 +- .../Nimble/Matchers/RaisesException.swift | 29 +- .../Nimble/Matchers/SatisfyAnyOf.swift | 14 +- .../Nimble/Matchers/ThrowAssertion.swift | 55 + .../Sources/Nimble/Matchers/ThrowError.swift | 16 +- Pods/Nimble/Sources/Nimble/Nimble.h | 7 + Pods/Nimble/Sources/Nimble/Utils/Async.swift | 155 +- Pods/Nimble/Sources/Nimble/Utils/Errors.swift | 51 +- .../Sources/Nimble/Utils/Functional.swift | 4 +- .../Sources/Nimble/Utils/Stringers.swift | 110 +- .../CurrentTestCaseTracker.h | 0 Pods/Nimble/Sources/NimbleObjectiveC/DSL.h | 377 ++++ .../ObjectiveC => NimbleObjectiveC}/DSL.m | 22 +- .../NimbleObjectiveC/NMBExceptionCapture.h | 11 + .../NMBExceptionCapture.m | 8 +- .../NMBStringify.h | 0 .../NMBStringify.m | 0 .../XCTestObservationCenter+Register.m | 0 Pods/Pods.xcodeproj/project.pbxproj | 1640 +++++++++-------- Pods/Quick/README.md | 10 +- .../Quick/Configuration/Configuration.swift | 24 +- Pods/Quick/Sources/Quick/DSL/DSL.swift | 40 +- Pods/Quick/Sources/Quick/DSL/World+DSL.swift | 44 +- Pods/Quick/Sources/Quick/ErrorUtility.swift | 4 +- Pods/Quick/Sources/Quick/Example.swift | 20 +- Pods/Quick/Sources/Quick/ExampleGroup.swift | 30 +- Pods/Quick/Sources/Quick/Hooks/Closures.swift | 2 +- .../Sources/Quick/Hooks/ExampleHooks.swift | 26 +- .../Sources/Quick/Hooks/HooksPhase.swift | 12 +- .../Sources/Quick/Hooks/SuiteHooks.swift | 14 +- .../Quick/NSBundle+CurrentTestBundle.swift | 10 +- .../Quick/QuickSelectedTestSuiteBuilder.swift | 11 +- .../Quick/Sources/Quick/String+FileName.swift | 2 +- Pods/Quick/Sources/Quick/World.swift | 50 +- .../Configuration/QuickConfiguration.h | 0 .../Configuration/QuickConfiguration.m | 0 .../{Quick => QuickObjectiveC}/DSL/QCKDSL.h | 0 .../{Quick => QuickObjectiveC}/DSL/QCKDSL.m | 0 .../DSL/World+DSL.h | 0 .../NSString+QCKSelectorName.h | 0 .../NSString+QCKSelectorName.m | 0 .../{Quick => QuickObjectiveC}/Quick.h | 0 .../{Quick => QuickObjectiveC}/QuickSpec.h | 0 .../{Quick => QuickObjectiveC}/QuickSpec.m | 0 .../{Quick => QuickObjectiveC}/World.h | 0 .../XCTestSuite+QuickTestSuiteBuilder.m | 0 Pods/Target Support Files/Nimble/Info.plist | 2 +- .../Nimble/Nimble-umbrella.h | 5 +- Pods/Target Support Files/Quick/Info.plist | 2 +- 98 files changed, 3779 insertions(+), 1703 deletions(-) create mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h create mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m create mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift create mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift create mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h create mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m create mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift create mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift create mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c create mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h rename Pods/Nimble/Sources/Nimble/Adapters/{ObjectiveC => }/NMBExpectation.swift (87%) rename Pods/Nimble/Sources/Nimble/Adapters/{ObjectiveC => }/NMBObjCMatcher.swift (55%) delete mode 100644 Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/DSL.h delete mode 100644 Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBExceptionCapture.h create mode 100644 Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift rename Pods/Nimble/Sources/{Nimble/Adapters/ObjectiveC => NimbleObjectiveC}/CurrentTestCaseTracker.h (100%) create mode 100644 Pods/Nimble/Sources/NimbleObjectiveC/DSL.h rename Pods/Nimble/Sources/{Nimble/Adapters/ObjectiveC => NimbleObjectiveC}/DSL.m (83%) create mode 100644 Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h rename Pods/Nimble/Sources/{Nimble/Adapters/ObjectiveC => NimbleObjectiveC}/NMBExceptionCapture.m (60%) rename Pods/Nimble/Sources/{Nimble/Adapters/ObjectiveC => NimbleObjectiveC}/NMBStringify.h (100%) rename Pods/Nimble/Sources/{Nimble/Adapters/ObjectiveC => NimbleObjectiveC}/NMBStringify.m (100%) rename Pods/Nimble/Sources/{Nimble/Adapters/ObjectiveC => NimbleObjectiveC}/XCTestObservationCenter+Register.m (100%) rename Pods/Quick/Sources/{Quick => QuickObjectiveC}/Configuration/QuickConfiguration.h (100%) rename Pods/Quick/Sources/{Quick => QuickObjectiveC}/Configuration/QuickConfiguration.m (100%) rename Pods/Quick/Sources/{Quick => QuickObjectiveC}/DSL/QCKDSL.h (100%) rename Pods/Quick/Sources/{Quick => QuickObjectiveC}/DSL/QCKDSL.m (100%) rename Pods/Quick/Sources/{Quick => QuickObjectiveC}/DSL/World+DSL.h (100%) rename Pods/Quick/Sources/{Quick => QuickObjectiveC}/NSString+QCKSelectorName.h (100%) rename Pods/Quick/Sources/{Quick => QuickObjectiveC}/NSString+QCKSelectorName.m (100%) rename Pods/Quick/Sources/{Quick => QuickObjectiveC}/Quick.h (100%) rename Pods/Quick/Sources/{Quick => QuickObjectiveC}/QuickSpec.h (100%) rename Pods/Quick/Sources/{Quick => QuickObjectiveC}/QuickSpec.m (100%) rename Pods/Quick/Sources/{Quick => QuickObjectiveC}/World.h (100%) rename Pods/Quick/Sources/{Quick => QuickObjectiveC}/XCTestSuite+QuickTestSuiteBuilder.m (100%) diff --git a/Podfile b/Podfile index 360c38d..338686b 100644 --- a/Podfile +++ b/Podfile @@ -15,8 +15,8 @@ target 'Astro' do target 'AstroTests' do inherit! :search_paths - pod 'Quick', '~> 0.9' - pod 'Nimble', '~> 4.1' + pod 'Quick', '~> 0.10' + pod 'Nimble', '~> 5.0' pod 'Nocilla', '~> 0.11' end end diff --git a/Podfile.lock b/Podfile.lock index 41acc67..2654087 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -17,23 +17,23 @@ PODS: - Astro/UI (2.0.0) - Astro/Utils (2.0.0) - Freddy (3.0.0) - - Nimble (4.1.0) + - Nimble (5.1.0) - Nocilla (0.11.0) - - Quick (0.9.3) + - Quick (0.10.0) - SwiftTask (5.0.0) DEPENDENCIES: - Alamofire (~> 4.0) - Astro (from `.`) - Freddy (~> 3.0) - - Nimble (~> 4.1) + - Nimble (~> 5.0) - Nocilla (~> 0.11) - - Quick (~> 0.9) + - Quick (~> 0.10) - SwiftTask (from `https://github.com/ReactKit/SwiftTask`, branch `swift/3.0`) EXTERNAL SOURCES: Astro: - :path: "." + :path: . SwiftTask: :branch: swift/3.0 :git: https://github.com/ReactKit/SwiftTask @@ -47,11 +47,11 @@ SPEC CHECKSUMS: Alamofire: fef59f00388f267e52d9b432aa5d93dc97190f14 Astro: 4cd8e4a684989a0506e48e548fea2c452476091e Freddy: 367f994c88a90dd3987293b4b1bec94a4530745a - Nimble: 97a0a4cae5124c117115634b2d055d8c97d0af19 + Nimble: 5ea121a2eda60440287054cde077fc0ad22227b3 Nocilla: 7af7a386071150cc8aa5da4da97d060f049dd61c - Quick: 13a2a2b19a5d8e3ed4fd0c36ee46597fd77ebf71 + Quick: 5d290df1c69d5ee2f0729956dcf0fd9a30447eaa SwiftTask: 7fcd92f8ac16876e82c0e4ced0cea7e028456b6b -PODFILE CHECKSUM: f28a2792f198f6b40c60f63e6c4b93ce9b6ecab8 +PODFILE CHECKSUM: 489eeec715b8a99a1bb79ae399495b01cd1d529b COCOAPODS: 1.1.0.rc.2 diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock index 41acc67..2654087 100644 --- a/Pods/Manifest.lock +++ b/Pods/Manifest.lock @@ -17,23 +17,23 @@ PODS: - Astro/UI (2.0.0) - Astro/Utils (2.0.0) - Freddy (3.0.0) - - Nimble (4.1.0) + - Nimble (5.1.0) - Nocilla (0.11.0) - - Quick (0.9.3) + - Quick (0.10.0) - SwiftTask (5.0.0) DEPENDENCIES: - Alamofire (~> 4.0) - Astro (from `.`) - Freddy (~> 3.0) - - Nimble (~> 4.1) + - Nimble (~> 5.0) - Nocilla (~> 0.11) - - Quick (~> 0.9) + - Quick (~> 0.10) - SwiftTask (from `https://github.com/ReactKit/SwiftTask`, branch `swift/3.0`) EXTERNAL SOURCES: Astro: - :path: "." + :path: . SwiftTask: :branch: swift/3.0 :git: https://github.com/ReactKit/SwiftTask @@ -47,11 +47,11 @@ SPEC CHECKSUMS: Alamofire: fef59f00388f267e52d9b432aa5d93dc97190f14 Astro: 4cd8e4a684989a0506e48e548fea2c452476091e Freddy: 367f994c88a90dd3987293b4b1bec94a4530745a - Nimble: 97a0a4cae5124c117115634b2d055d8c97d0af19 + Nimble: 5ea121a2eda60440287054cde077fc0ad22227b3 Nocilla: 7af7a386071150cc8aa5da4da97d060f049dd61c - Quick: 13a2a2b19a5d8e3ed4fd0c36ee46597fd77ebf71 + Quick: 5d290df1c69d5ee2f0729956dcf0fd9a30447eaa SwiftTask: 7fcd92f8ac16876e82c0e4ced0cea7e028456b6b -PODFILE CHECKSUM: f28a2792f198f6b40c60f63e6c4b93ce9b6ecab8 +PODFILE CHECKSUM: 489eeec715b8a99a1bb79ae399495b01cd1d529b COCOAPODS: 1.1.0.rc.2 diff --git a/Pods/Nimble/README.md b/Pods/Nimble/README.md index 6a71957..684255e 100644 --- a/Pods/Nimble/README.md +++ b/Pods/Nimble/README.md @@ -6,7 +6,6 @@ or Objective-C expressions. Inspired by ```swift // Swift - expect(1 + 1).to(equal(2)) expect(1.2).to(beCloseTo(1.1, within: 0.1)) expect(3) > 2 @@ -37,12 +36,14 @@ expect(ocean.isClean).toEventually(beTruthy()) - [Comparisons](#comparisons) - [Types/Classes](#typesclasses) - [Truthiness](#truthiness) + - [Swift Assertions](#swift-assertions) - [Swift Error Handling](#swift-error-handling) - [Exceptions](#exceptions) - [Collection Membership](#collection-membership) - [Strings](#strings) - [Checking if all elements of a collection pass a condition](#checking-if-all-elements-of-a-collection-pass-a-condition) - [Verify collection count](#verify-collection-count) + - [Verify a notification was posted](#verifying-a-notification-was-posted) - [Matching a value to any of a group of matchers](#matching-a-value-to-any-of-a-group-of-matchers) - [Writing Your Own Matchers](#writing-your-own-matchers) - [Lazy Evaluation](#lazy-evaluation) @@ -328,6 +329,9 @@ cases, use the `timeout` parameter: // Waits three seconds for ocean to contain "starfish": expect(ocean).toEventually(contain("starfish"), timeout: 3) + +// Evaluate someValue every 0.2 seconds repeatedly until it equals 100, or fails if it timeouts after 5.5 seconds. +expect(someValue).toEventually(equal(100), timeout: 5.5, pollInterval: 0.2) ``` ```objc @@ -406,7 +410,8 @@ Nimble has full support for Objective-C. However, there are two things to keep in mind when using Nimble in Objective-C: 1. All parameters passed to the `expect` function, as well as matcher - functions like `equal`, must be Objective-C objects: + functions like `equal`, must be Objective-C objects or can be converted into + an `NSObject` equivalent: ```objc // Objective-C @@ -415,6 +420,17 @@ to keep in mind when using Nimble in Objective-C: expect(@(1 + 1)).to(equal(@2)); expect(@"Hello world").to(contain(@"world")); + + // Boxed as NSNumber * + expect(2).to(equal(2)); + expect(1.2).to(beLessThan(2.0)); + expect(true).to(beTruthy()); + + // Boxed as NSString * + expect("Hello world").to(equal("Hello world")); + + // Boxed as NSRange + expect(NSMakeRange(1, 10)).to(equal(NSMakeRange(1, 10))); ``` 2. To make an expectation on an expression that does not return a value, @@ -427,6 +443,28 @@ to keep in mind when using Nimble in Objective-C: expectAction(^{ [exception raise]; }).to(raiseException()); ``` +The following types are currently converted to an `NSObject` type: + + - **C Numeric types** are converted to `NSNumber *` + - `NSRange` is converted to `NSValue *` + - `char *` is converted to `NSString *` + +For the following matchers: + +- `equal` +- `beGreaterThan` +- `beGreaterThanOrEqual` +- `beLessThan` +- `beLessThanOrEqual` +- `beCloseTo` +- `beTrue` +- `beFalse` +- `beTruthy` +- `beFalsy` +- `haveCount` + +If you would like to see more, [file an issue](https://github.com/Quick/Nimble/issues). + ## Disabling Objective-C Shorthand Nimble provides a shorthand for expressing expectations using the @@ -649,13 +687,13 @@ expect(dolphin).to(beAKindOf([Mammal class])); // Passes if actual is not nil, true, or an object with a boolean value of true: expect(actual).to(beTruthy()) -// Passes if actual is only true (not nil or an object conforming to BooleanType true): +// Passes if actual is only true (not nil or an object conforming to Boolean true): expect(actual).to(beTrue()) // Passes if actual is nil, false, or an object with a boolean value of false: expect(actual).to(beFalsy()) -// Passes if actual is only false (not nil or an object conforming to BooleanType false): +// Passes if actual is only false (not nil or an object conforming to Boolean false): expect(actual).to(beFalse()) // Passes if actual is nil: @@ -668,19 +706,52 @@ expect(actual).to(beNil()) // Passes if actual is not nil, true, or an object with a boolean value of true: expect(actual).to(beTruthy()); -// Passes if actual is only true (not nil or an object conforming to BooleanType true): +// Passes if actual is only true (not nil or an object conforming to Boolean true): expect(actual).to(beTrue()); // Passes if actual is nil, false, or an object with a boolean value of false: expect(actual).to(beFalsy()); -// Passes if actual is only false (not nil or an object conforming to BooleanType false): +// Passes if actual is only false (not nil or an object conforming to Boolean false): expect(actual).to(beFalse()); // Passes if actual is nil: expect(actual).to(beNil()); ``` +## Swift Assertions + +If you're using Swift, you can use the `throwAssertion` matcher to check if an assertion is thrown (e.g. `fatalError()`). This is made possible by [@mattgallagher](https://github.com/mattgallagher)'s [CwlPreconditionTesting](https://github.com/mattgallagher/CwlPreconditionTesting) library. + +```swift +// Swift + +// Passes if somethingThatThrows() throws an assertion, such as calling fatalError() or precondition fails: +expect { () -> Void in fatalError() }.to(throwAssertion()) +expect { precondition(false) }.to(throwAssertion()) + +// Passes if throwing a NSError is not equal to throwing an assertion: +expect { throw NSError(domain: "test", code: 0, userInfo: nil) }.toNot(throwAssertion()) + +// Passes if the post assertion code is not run: +var reachedPoint1 = false +var reachedPoint2 = false +expect { + reachedPoint1 = true + precondition(false, "condition message") + reachedPoint2 = true +}.to(throwAssertion()) + +expect(reachedPoint1) == true +expect(reachedPoint2) == false +``` + +Notes: + +* This feature is only available in Swift. +* It is only supported for `x86_64` binaries, meaning _you cannot run this matcher on iOS devices, only simulators_. +* The tvOS simulator is supported, but using a different mechanism, requiring you to turn off the `Debug executable` scheme setting for your tvOS scheme's Test configuration. + ## Swift Error Handling If you're using Swift 2.0+, you can use the `throwError` matcher to check if an error is thrown. @@ -688,11 +759,11 @@ If you're using Swift 2.0+, you can use the `throwError` matcher to check if an ```swift // Swift -// Passes if somethingThatThrows() throws an ErrorType: +// Passes if somethingThatThrows() throws an ErrorProtocol: expect{ try somethingThatThrows() }.to(throwError()) // Passes if somethingThatThrows() throws an error with a given domain: -expect{ try somethingThatThrows() }.to(throwError { (error: ErrorType) in +expect{ try somethingThatThrows() }.to(throwError { (error: ErrorProtocol) in expect(error._domain).to(equal(NSCocoaErrorDomain)) }) @@ -700,21 +771,21 @@ expect{ try somethingThatThrows() }.to(throwError { (error: ErrorType) in expect{ try somethingThatThrows() }.to(throwError(NSCocoaError.PropertyListReadCorruptError)) // Passes if somethingThatThrows() throws an error with a given type: -expect{ try somethingThatThrows() }.to(throwError(errorType: MyError.self)) +expect{ try somethingThatThrows() }.to(throwError(errorType: NimbleError.self)) ``` -If you are working directly with `ErrorType` values, as is sometimes the case when using `Result` or `Promise` types, you can use the `matchError` matcher to check if the error is the same error is is supposed to be, without requiring explicit casting. +If you are working directly with `ErrorProtocol` values, as is sometimes the case when using `Result` or `Promise` types, you can use the `matchError` matcher to check if the error is the same error is is supposed to be, without requiring explicit casting. ```swift // Swift -let actual: ErrorType = … +let actual: ErrorProtocol = … -// Passes if actual contains any error value from the MyErrorEnum type: -expect(actual).to(matchError(MyErrorEnum)) +// Passes if actual contains any error value from the NimbleErrorEnum type: +expect(actual).to(matchError(NimbleErrorEnum)) -// Passes if actual contains the Timeout value from the MyErrorEnum type: -expect(actual).to(matchError(MyErrorEnum.Timeout)) +// Passes if actual contains the Timeout value from the NimbleErrorEnum type: +expect(actual).to(matchError(NimbleErrorEnum.Timeout)) // Passes if actual contains an NSError equal to the given one: expect(actual).to(matchError(NSError(domain: "err", code: 123, userInfo: nil))) @@ -898,7 +969,7 @@ expect([1,2,3,4]).to(allPass(beLessThan(5))) expect(@[@1, @2, @3,@4]).to(allPass(beLessThan(@5))); ``` -For Swift the actual value has to be a SequenceType, e.g. an array, a set or a custom seqence type. +For Swift the actual value has to be a Sequence, e.g. an array, a set or a custom seqence type. For Objective-C the actual value has to be a NSFastEnumeration, e.g. NSArray and NSSet, of NSObjects and only the variant which uses another matcher is available here. @@ -906,6 +977,8 @@ uses another matcher is available here. ## Verify collection count ```swift +// Swift + // passes if actual collection's count is equal to expected expect(actual).to(haveCount(expected)) @@ -914,6 +987,8 @@ expect(actual).notTo(haveCount(expected)) ``` ```objc +// Objective-C + // passes if actual collection's count is equal to expected expect(actual).to(haveCount(expected)) @@ -921,10 +996,34 @@ expect(actual).to(haveCount(expected)) expect(actual).notTo(haveCount(expected)) ``` -For Swift the actual value must be a `CollectionType` such as array, dictionary or set. +For Swift the actual value must be a `Collection` such as array, dictionary or set. For Objective-C the actual value has to be one of the following classes `NSArray`, `NSDictionary`, `NSSet`, `NSHashTable` or one of their subclasses. +## Foundation + +### Verifying a Notification was posted + +```swift +// Swift +let testNotification = Notification(name: "Foo", object: nil) + +// passes if the closure in expect { ... } posts a notification to the default +// notification center. +expect { + NotificationCenter.default.postNotification(testNotification) +}.to(postNotifications(equal([testNotification])) + +// passes if the closure in expect { ... } posts a notification to a given +// notification center +let notificationCenter = NotificationCenter() +expect { + notificationCenter.postNotification(testNotification) +}.to(postNotifications(equal([testNotification]), fromNotificationCenter: notificationCenter)) +``` + +> This matcher is only available in Swift. + ## Matching a value to any of a group of matchers ```swift @@ -948,10 +1047,10 @@ expect(actual).to(satisfyAnyOf(beLessThan(@10), beGreaterThan(@20))) expect(@6).to(satisfyAnyOf(equal(@2), equal(@3), equal(@4), equal(@5), equal(@6), equal(@7))) ``` -Note: This matcher allows you to chain any number of matchers together. This provides flexibility, - but if you find yourself chaining many matchers together in one test, consider whether you - could instead refactor that single test into multiple, more precisely focused tests for - better coverage. +Note: This matcher allows you to chain any number of matchers together. This provides flexibility, + but if you find yourself chaining many matchers together in one test, consider whether you + could instead refactor that single test into multiple, more precisely focused tests for + better coverage. # Writing Your Own Matchers @@ -964,7 +1063,11 @@ value and return a `MatcherFunc` closure. Take `equal`, for example: public func equal(expectedValue: T?) -> MatcherFunc { return MatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "equal <\(expectedValue)>" - return actualExpression.evaluate() == expectedValue + if let actualValue = try actualExpression.evaluate() { + return actualValue == expectedValue + } else { + return false + } } } ``` @@ -1131,11 +1234,11 @@ automatically generate expected value failure messages when they're nil. ```swift -public func beginWith(startingElement: T) -> NonNilMatcherFunc { +public func beginWith(startingElement: T) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "begin with <\(startingElement)>" if let actualValue = actualExpression.evaluate() { - var actualGenerator = actualValue.generate() + var actualGenerator = actualValue.makeIterator() return actualGenerator.next() == startingElement } return false @@ -1158,15 +1261,15 @@ extension NMBObjCMatcher { > Nimble can be used on its own, or in conjunction with its sister project, [Quick](https://github.com/Quick/Quick). To install both Quick and Nimble, follow [the installation instructions in the Quick - README](https://github.com/Quick/Quick#how-to-install-quick). + Documentation](https://github.com/Quick/Quick/blob/master/Documentation/en-us/InstallingQuick.md). Nimble can currently be installed in one of two ways: using CocoaPods, or with git submodules. ## Installing Nimble as a Submodule -To use Nimble as a submodule to test your iOS or OS X applications, follow these -4 easy steps: +To use Nimble as a submodule to test your macOS, iOS or tvOS applications, follow +these 4 easy steps: 1. Clone the Nimble repository 2. Add Nimble.xcodeproj to the Xcode workspace for your project @@ -1180,9 +1283,9 @@ install just Nimble. ## Installing Nimble via CocoaPods -To use Nimble in CocoaPods to test your iOS or OS X applications, add Nimble to -your podfile and add the ```use_frameworks!``` line to enable Swift support for -CocoaPods. +To use Nimble in CocoaPods to test your macOS, iOS or tvOS applications, add +Nimble to your podfile and add the ```use_frameworks!``` line to enable Swift +support for CocoaPods. ```ruby platform :ios, '8.0' @@ -1193,7 +1296,7 @@ source 'https://github.com/CocoaPods/Specs.git' target 'YOUR_APP_NAME_HERE_Tests', :exclusive => true do use_frameworks! - pod 'Nimble', '~> 4.0.0' + pod 'Nimble', '~> 5.0.0' end ``` diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h new file mode 100644 index 0000000..6ec6a29 --- /dev/null +++ b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h @@ -0,0 +1,30 @@ +// +// CwlCatchException.h +// CwlCatchException +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +#import + +//! Project version number for CwlCatchException. +FOUNDATION_EXPORT double CwlCatchExceptionVersionNumber; + +//! Project version string for CwlCatchException. +FOUNDATION_EXPORT const unsigned char CwlCatchExceptionVersionString[]; + +__attribute__((visibility("hidden"))) +NSException* __nullable catchExceptionOfKind(Class __nonnull type, __attribute__((noescape)) void (^ __nonnull inBlock)()); diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m new file mode 100644 index 0000000..4f9772c --- /dev/null +++ b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m @@ -0,0 +1,35 @@ +// +// CwlCatchException.m +// CwlAssertionTesting +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +#import "CwlCatchException.h" + +__attribute__((visibility("hidden"))) +NSException* catchExceptionOfKind(Class __nonnull type, __attribute__((noescape)) void (^ __nonnull inBlock)()) { + @try { + inBlock(); + } @catch (NSException *exception) { + if ([exception isKindOfClass:type]) { + return exception; + } else { + @throw; + } + } + return nil; +} diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift new file mode 100644 index 0000000..b44a232 --- /dev/null +++ b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift @@ -0,0 +1,32 @@ +// +// CwlCatchException.swift +// CwlAssertionTesting +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +import Foundation + +// We can't simply cast to Self? in the catchInBlock method so we need this generic function wrapper to do the conversion for us. Mildly annoying. +private func catchReturnTypeConverter(_ type: T.Type, block: () -> Void) -> T? { + return catchExceptionOfKind(type, block) as? T +} + +extension NSException { + public static func catchException(in block: () -> Void) -> Self? { + return catchReturnTypeConverter(self, block: block) + } +} diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift new file mode 100644 index 0000000..2fa67c9 --- /dev/null +++ b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift @@ -0,0 +1,76 @@ +// +// CwlBadInstructionException.swift +// CwlPreconditionTesting +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +import Foundation + +private func raiseBadInstructionException() { + BadInstructionException().raise() +} + +/// A simple NSException subclass. It's not required to subclass NSException (since the exception type is represented in the name) but this helps for identifying the exception through runtime type. +@objc public class BadInstructionException: NSException { + static var name: String = "com.cocoawithlove.BadInstruction" + + init() { + super.init(name: NSExceptionName(rawValue: BadInstructionException.name), reason: nil, userInfo: nil) + } + + required public init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + } + + /// An Objective-C callable function, invoked from the `mach_exc_server` callback function `catch_mach_exception_raise_state` to push the `raiseBadInstructionException` function onto the stack. + public class func catch_mach_exception_raise_state(_ exception_port: mach_port_t, exception: exception_type_t, code: UnsafePointer, codeCnt: mach_msg_type_number_t, flavor: UnsafeMutablePointer, old_state: UnsafePointer, old_stateCnt: mach_msg_type_number_t, new_state: thread_state_t, new_stateCnt: UnsafeMutablePointer) -> kern_return_t { + + #if arch(x86_64) + // Make sure we've been given enough memory + if old_stateCnt != x86_THREAD_STATE64_COUNT || new_stateCnt.pointee < x86_THREAD_STATE64_COUNT { + return KERN_INVALID_ARGUMENT + } + + // Read the old thread state + var state = old_state.withMemoryRebound(to: x86_thread_state64_t.self, capacity: 1) { return $0.pointee } + + // 1. Decrement the stack pointer + state.__rsp -= __uint64_t(MemoryLayout.size) + + // 2. Save the old Instruction Pointer to the stack. + if let pointer = UnsafeMutablePointer<__uint64_t>(bitPattern: UInt(state.__rsp)) { + pointer.pointee = state.__rip + } else { + return KERN_INVALID_ARGUMENT + } + + // 3. Set the Instruction Pointer to the new function's address + var f: @convention(c) () -> Void = raiseBadInstructionException + withUnsafePointer(to: &f) { + state.__rip = $0.withMemoryRebound(to: __uint64_t.self, capacity: 1) { return $0.pointee } + } + + // Write the new thread state + new_state.withMemoryRebound(to: x86_thread_state64_t.self, capacity: 1) { $0.pointee = state } + new_stateCnt.pointee = x86_THREAD_STATE64_COUNT + + return KERN_SUCCESS + #else + fatalError("Unavailable for this CPU architecture") + #endif + } +} diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h new file mode 100644 index 0000000..0333ed2 --- /dev/null +++ b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h @@ -0,0 +1,61 @@ +// +// CwlCatchBadInstruction.h +// CwlPreconditionTesting +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +#if defined(__x86_64__) + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +// The request_mach_exception_raise_t struct is passed to mach_msg which assumes its exact layout. To avoid problems with different layouts, we keep the definition in C rather than Swift. +typedef struct +{ + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t thread; + mach_msg_port_descriptor_t task; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + int64_t code[2]; + int flavor; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[224]; +} request_mach_exception_raise_t; + +// The reply_mach_exception_raise_state_t struct is passed to mach_msg which assumes its exact layout. To avoid problems with different layouts, we keep the definition in C rather than Swift. +typedef struct +{ + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + int flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[224]; +} reply_mach_exception_raise_state_t; + +extern boolean_t mach_exc_server(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); + +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m new file mode 100644 index 0000000..22c1377 --- /dev/null +++ b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m @@ -0,0 +1,50 @@ +// +// CwlCatchBadInstruction.m +// CwlPreconditionTesting +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +#if defined(__x86_64__) + +#import "CwlCatchBadInstruction.h" + +// Assuming the "PRODUCT_NAME" macro is defined, this will create the name of the Swift generated header file +#define STRINGIZE_NO_EXPANSION(A) #A +#define STRINGIZE_WITH_EXPANSION(A) STRINGIZE_NO_EXPANSION(A) +#define SWIFT_INCLUDE STRINGIZE_WITH_EXPANSION(PRODUCT_NAME-Swift.h) + +// Include the Swift generated header file +#import SWIFT_INCLUDE + +/// A basic function that receives callbacks from mach_exc_server and relays them to the Swift implemented BadInstructionException.catch_mach_exception_raise_state. +kern_return_t catch_mach_exception_raise_state(mach_port_t exception_port, exception_type_t exception, const mach_exception_data_t code, mach_msg_type_number_t codeCnt, int *flavor, const thread_state_t old_state, mach_msg_type_number_t old_stateCnt, thread_state_t new_state, mach_msg_type_number_t *new_stateCnt) { + return [BadInstructionException catch_mach_exception_raise_state:exception_port exception:exception code:code codeCnt:codeCnt flavor:flavor old_state:old_state old_stateCnt:old_stateCnt new_state:new_state new_stateCnt:new_stateCnt]; +} + +// The mach port should be configured so that this function is never used. +kern_return_t catch_mach_exception_raise(mach_port_t exception_port, mach_port_t thread, mach_port_t task, exception_type_t exception, mach_exception_data_t code, mach_msg_type_number_t codeCnt) { + assert(false); + return KERN_FAILURE; +} + +// The mach port should be configured so that this function is never used. +kern_return_t catch_mach_exception_raise_state_identity(mach_port_t exception_port, mach_port_t thread, mach_port_t task, exception_type_t exception, mach_exception_data_t code, mach_msg_type_number_t codeCnt, int *flavor, thread_state_t old_state, mach_msg_type_number_t old_stateCnt, thread_state_t new_state, mach_msg_type_number_t *new_stateCnt) { + assert(false); + return KERN_FAILURE; +} + +#endif diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift new file mode 100644 index 0000000..ab460b3 --- /dev/null +++ b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift @@ -0,0 +1,194 @@ +// +// CwlCatchBadInstruction.swift +// CwlPreconditionTesting +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +import Foundation + +#if arch(x86_64) + + private enum PthreadError: Error { case code(Int32) } + private enum MachExcServer: Error { case code(kern_return_t) } + + /// A quick function for converting Mach error results into Swift errors + private func kernCheck(_ f: () -> Int32) throws { + let r = f() + guard r == KERN_SUCCESS else { + throw NSError(domain: NSMachErrorDomain, code: Int(r), userInfo: nil) + } + } + + extension execTypesCountTuple { + mutating func pointer(in block: (UnsafeMutablePointer) -> R) -> R { + return withUnsafeMutablePointer(to: &self) { p -> R in + return p.withMemoryRebound(to: T.self, capacity: EXC_TYPES_COUNT) { ptr -> R in + return block(ptr) + } + } + } + } + + extension request_mach_exception_raise_t { + mutating func withMsgHeaderPointer(in block: (UnsafeMutablePointer) -> R) -> R { + return withUnsafeMutablePointer(to: &self) { p -> R in + return p.withMemoryRebound(to: mach_msg_header_t.self, capacity: 1) { ptr -> R in + return block(ptr) + } + } + } + } + + extension reply_mach_exception_raise_state_t { + mutating func withMsgHeaderPointer(in block: (UnsafeMutablePointer) -> R) -> R { + return withUnsafeMutablePointer(to: &self) { p -> R in + return p.withMemoryRebound(to: mach_msg_header_t.self, capacity: 1) { ptr -> R in + return block(ptr) + } + } + } + } + + /// A structure used to store context associated with the Mach message port + private struct MachContext { + var masks = execTypesCountTuple() + var count: mach_msg_type_number_t = 0 + var ports = execTypesCountTuple() + var behaviors = execTypesCountTuple() + var flavors = execTypesCountTuple() + var currentExceptionPort: mach_port_t = 0 + var handlerThread: pthread_t? = nil + + mutating func withUnsafeMutablePointers(in block: (UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer) -> R) -> R { + return masks.pointer { masksPtr in + return ports.pointer { portsPtr in + return behaviors.pointer { behaviorsPtr in + return flavors.pointer { flavorsPtr in + return block(masksPtr, portsPtr, behaviorsPtr, flavorsPtr) + } + } + } + } + } + } + + /// A function for receiving mach messages and parsing the first with mach_exc_server (and if any others are received, throwing them away). + private func machMessageHandler(_ arg: UnsafeMutableRawPointer) -> UnsafeMutableRawPointer? { + let context = arg.assumingMemoryBound(to: MachContext.self).pointee + var request = request_mach_exception_raise_t() + var reply = reply_mach_exception_raise_state_t() + + var handledfirstException = false + repeat { do { + // Request the next mach message from the port + request.Head.msgh_local_port = context.currentExceptionPort + request.Head.msgh_size = UInt32(MemoryLayout.size) + try kernCheck { request.withMsgHeaderPointer { requestPtr in + mach_msg(requestPtr, MACH_RCV_MSG | MACH_RCV_INTERRUPT, 0, request.Head.msgh_size, context.currentExceptionPort, 0, UInt32(MACH_PORT_NULL)) + } } + + // Prepare the reply structure + reply.Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(request.Head.msgh_bits), 0) + reply.Head.msgh_local_port = UInt32(MACH_PORT_NULL) + reply.Head.msgh_remote_port = request.Head.msgh_remote_port + reply.Head.msgh_size = UInt32(MemoryLayout.size) + reply.NDR = NDR_record + + if !handledfirstException { + // Use the MiG generated server to invoke our handler for the request and fill in the rest of the reply structure + guard request.withMsgHeaderPointer(in: { requestPtr in reply.withMsgHeaderPointer { replyPtr in + mach_exc_server(requestPtr, replyPtr) + } }) != 0 else { throw MachExcServer.code(reply.RetCode) } + + handledfirstException = true + } else { + // If multiple fatal errors occur, don't handle subsquent errors (let the program crash) + reply.RetCode = KERN_FAILURE + } + + // Send the reply + try kernCheck { reply.withMsgHeaderPointer { replyPtr in + mach_msg(replyPtr, MACH_SEND_MSG, reply.Head.msgh_size, 0, UInt32(MACH_PORT_NULL), 0, UInt32(MACH_PORT_NULL)) + } } + } catch let error as NSError where (error.domain == NSMachErrorDomain && (error.code == Int(MACH_RCV_PORT_CHANGED) || error.code == Int(MACH_RCV_INVALID_NAME))) { + // Port was already closed before we started or closed while we were listening. + // This means the controlling thread shut down. + return nil + } catch { + // Should never be reached but this is testing code, don't try to recover, just abort + fatalError("Mach message error: \(error)") + } } while true + } + + /// Run the provided block. If a mach "BAD_INSTRUCTION" exception is raised, catch it and return a BadInstructionException (which captures stack information about the throw site, if desired). Otherwise return nil. + /// NOTE: This function is only intended for use in test harnesses – use in a distributed build is almost certainly a bad choice. If a "BAD_INSTRUCTION" exception is raised, the block will be exited before completion via Objective-C exception. The risks associated with an Objective-C exception apply here: most Swift/Objective-C functions are *not* exception-safe. Memory may be leaked and the program will not necessarily be left in a safe state. + /// - parameter block: a function without parameters that will be run + /// - returns: if an EXC_BAD_INSTRUCTION is raised during the execution of `block` then a BadInstructionException will be returned, otherwise `nil`. + public func catchBadInstruction(in block: () -> Void) -> BadInstructionException? { + var context = MachContext() + var result: BadInstructionException? = nil + do { + var handlerThread: pthread_t? = nil + defer { + // 8. Wait for the thread to terminate *if* we actually made it to the creation point + // The mach port should be destroyed *before* calling pthread_join to avoid a deadlock. + if handlerThread != nil { + pthread_join(handlerThread!, nil) + } + } + + try kernCheck { + // 1. Create the mach port + mach_port_allocate(mach_task_self_, MACH_PORT_RIGHT_RECEIVE, &context.currentExceptionPort) + } + defer { + // 7. Cleanup the mach port + mach_port_destroy(mach_task_self_, context.currentExceptionPort) + } + + try kernCheck { + // 2. Configure the mach port + mach_port_insert_right(mach_task_self_, context.currentExceptionPort, context.currentExceptionPort, MACH_MSG_TYPE_MAKE_SEND) + } + + try kernCheck { context.withUnsafeMutablePointers { masksPtr, portsPtr, behaviorsPtr, flavorsPtr in + // 3. Apply the mach port as the handler for this thread + thread_swap_exception_ports(mach_thread_self(), EXC_MASK_BAD_INSTRUCTION, context.currentExceptionPort, Int32(bitPattern: UInt32(EXCEPTION_STATE) | MACH_EXCEPTION_CODES), x86_THREAD_STATE64, masksPtr, &context.count, portsPtr, behaviorsPtr, flavorsPtr) + } } + + defer { context.withUnsafeMutablePointers { masksPtr, portsPtr, behaviorsPtr, flavorsPtr in + // 6. Unapply the mach port + _ = thread_swap_exception_ports(mach_thread_self(), EXC_MASK_BAD_INSTRUCTION, 0, EXCEPTION_DEFAULT, THREAD_STATE_NONE, masksPtr, &context.count, portsPtr, behaviorsPtr, flavorsPtr) + } } + + try withUnsafeMutablePointer(to: &context) { c throws in + // 4. Create the thread + let e = pthread_create(&handlerThread, nil, machMessageHandler, c) + guard e == 0 else { throw PthreadError.code(e) } + + // 5. Run the block + result = BadInstructionException.catchException(in: block) + } + } catch { + // Should never be reached but this is testing code, don't try to recover, just abort + fatalError("Mach port error: \(error)") + } + return result + } + +#endif + diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift new file mode 100644 index 0000000..12a6b9f --- /dev/null +++ b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift @@ -0,0 +1,63 @@ +// +// CwlDarwinDefinitions.swift +// CwlPreconditionTesting +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// + +import Darwin + +#if arch(x86_64) + +// From /usr/include/mach/port.h +// #define MACH_PORT_RIGHT_RECEIVE ((mach_port_right_t) 1) +let MACH_PORT_RIGHT_RECEIVE: mach_port_right_t = 1 + +// From /usr/include/mach/message.h +// #define MACH_MSG_TYPE_MAKE_SEND 20 /* Must hold receive right */ +// #define MACH_MSGH_BITS_REMOTE(bits) \ +// ((bits) & MACH_MSGH_BITS_REMOTE_MASK) +// #define MACH_MSGH_BITS(remote, local) /* legacy */ \ +// ((remote) | ((local) << 8)) +let MACH_MSG_TYPE_MAKE_SEND: UInt32 = 20 +func MACH_MSGH_BITS_REMOTE(_ bits: UInt32) -> UInt32 { return bits & UInt32(MACH_MSGH_BITS_REMOTE_MASK) } +func MACH_MSGH_BITS(_ remote: UInt32, _ local: UInt32) -> UInt32 { return ((remote) | ((local) << 8)) } + +// From /usr/include/mach/exception_types.h +// #define EXC_BAD_INSTRUCTION 2 /* Instruction failed */ +// #define EXC_MASK_BAD_INSTRUCTION (1 << EXC_BAD_INSTRUCTION) +// #define EXCEPTION_DEFAULT 1 +let EXC_BAD_INSTRUCTION: UInt32 = 2 +let EXC_MASK_BAD_INSTRUCTION: UInt32 = 1 << EXC_BAD_INSTRUCTION +let EXCEPTION_DEFAULT: Int32 = 1 + +// From /usr/include/mach/i386/thread_status.h +// #define THREAD_STATE_NONE 13 +// #define x86_THREAD_STATE64_COUNT ((mach_msg_type_number_t) \ +// ( sizeof (x86_thread_state64_t) / sizeof (int) )) +let THREAD_STATE_NONE: Int32 = 13 +let x86_THREAD_STATE64_COUNT = UInt32(MemoryLayout.size / MemoryLayout.size) + +let EXC_TYPES_COUNT = 14 +struct execTypesCountTuple { + // From /usr/include/mach/i386/exception.h + // #define EXC_TYPES_COUNT 14 /* incl. illegal exception 0 */ + var value: (T,T,T,T,T,T,T,T,T,T,T,T,T,T) = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) + init() { + } +} + +#endif diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c new file mode 100644 index 0000000..2334538 --- /dev/null +++ b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c @@ -0,0 +1,537 @@ +/* + * IDENTIFICATION: + * stub generated Mon Jan 11 00:24:26 2016 + * with a MiG generated by bootstrap_cmds-93 + * OPTIONS: + */ + +/* Module mach_exc */ + +#if defined(__x86_64__) + +#define __MIG_check__Request__mach_exc_subsystem__ 1 + +#include "mach_excServer.h" + +#ifndef mig_internal +#define mig_internal static __inline__ +#endif /* mig_internal */ + +#ifndef mig_external +#define mig_external +#endif /* mig_external */ + +#if !defined(__MigTypeCheck) && defined(TypeCheck) +#define __MigTypeCheck TypeCheck /* Legacy setting */ +#endif /* !defined(__MigTypeCheck) */ + +#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_) +#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */ +#endif /* !defined(__MigKernelSpecificCode) */ + +#ifndef LimitCheck +#define LimitCheck 0 +#endif /* LimitCheck */ + +#ifndef min +#define min(a,b) ( ((a) < (b))? (a): (b) ) +#endif /* min */ + +#if !defined(_WALIGN_) +#define _WALIGN_(x) (((x) + 3) & ~3) +#endif /* !defined(_WALIGN_) */ + +#if !defined(_WALIGNSZ_) +#define _WALIGNSZ_(x) _WALIGN_(sizeof(x)) +#endif /* !defined(_WALIGNSZ_) */ + +#ifndef UseStaticTemplates +#define UseStaticTemplates 0 +#endif /* UseStaticTemplates */ + +#ifndef __DeclareRcvRpc +#define __DeclareRcvRpc(_NUM_, _NAME_) +#endif /* __DeclareRcvRpc */ + +#ifndef __BeforeRcvRpc +#define __BeforeRcvRpc(_NUM_, _NAME_) +#endif /* __BeforeRcvRpc */ + +#ifndef __AfterRcvRpc +#define __AfterRcvRpc(_NUM_, _NAME_) +#endif /* __AfterRcvRpc */ + +#ifndef __DeclareRcvSimple +#define __DeclareRcvSimple(_NUM_, _NAME_) +#endif /* __DeclareRcvSimple */ + +#ifndef __BeforeRcvSimple +#define __BeforeRcvSimple(_NUM_, _NAME_) +#endif /* __BeforeRcvSimple */ + +#ifndef __AfterRcvSimple +#define __AfterRcvSimple(_NUM_, _NAME_) +#endif /* __AfterRcvSimple */ + +#define novalue void + +#define msgh_request_port msgh_local_port +#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits) +#define msgh_reply_port msgh_remote_port +#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits) + +#define MIG_RETURN_ERROR(X, code) {\ + ((mig_reply_error_t *)X)->RetCode = code;\ + ((mig_reply_error_t *)X)->NDR = NDR_record;\ + return;\ + } + +/* Forward Declarations */ + + +mig_internal novalue _Xmach_exception_raise + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); + +mig_internal novalue _Xmach_exception_raise_state + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); + +mig_internal novalue _Xmach_exception_raise_state_identity + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); + + +#if ( __MigTypeCheck ) +#if __MIG_check__Request__mach_exc_subsystem__ +#if !defined(__MIG_check__Request__mach_exception_raise_t__defined) +#define __MIG_check__Request__mach_exception_raise_t__defined + +mig_internal kern_return_t __MIG_check__Request__mach_exception_raise_t(__attribute__((__unused__)) __Request__mach_exception_raise_t *In0P) +{ + + typedef __Request__mach_exception_raise_t __Request; +#if __MigTypeCheck + unsigned int msgh_size; +#endif /* __MigTypeCheck */ + +#if __MigTypeCheck + msgh_size = In0P->Head.msgh_size; + if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || + (In0P->msgh_body.msgh_descriptor_count != 2) || + (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 16)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) + return MIG_BAD_ARGUMENTS; +#endif /* __MigTypeCheck */ + +#if __MigTypeCheck + if (In0P->thread.type != MACH_MSG_PORT_DESCRIPTOR || + In0P->thread.disposition != 17) + return MIG_TYPE_ERROR; +#endif /* __MigTypeCheck */ + +#if __MigTypeCheck + if (In0P->task.type != MACH_MSG_PORT_DESCRIPTOR || + In0P->task.disposition != 17) + return MIG_TYPE_ERROR; +#endif /* __MigTypeCheck */ + +#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_t__codeCnt__defined) + if (In0P->NDR.int_rep != NDR_record.int_rep) + __NDR_convert__int_rep__Request__mach_exception_raise_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); +#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_t__codeCnt__defined */ +#if __MigTypeCheck + if ( In0P->codeCnt > 2 ) + return MIG_BAD_ARGUMENTS; + if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 16)) / 8 < In0P->codeCnt) || + (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 16) + (8 * In0P->codeCnt))) + return MIG_BAD_ARGUMENTS; +#endif /* __MigTypeCheck */ + + return MACH_MSG_SUCCESS; +} +#endif /* !defined(__MIG_check__Request__mach_exception_raise_t__defined) */ +#endif /* __MIG_check__Request__mach_exc_subsystem__ */ +#endif /* ( __MigTypeCheck ) */ + + +/* Routine mach_exception_raise */ +mig_internal novalue _Xmach_exception_raise + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) +{ + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t thread; + mach_msg_port_descriptor_t task; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + int64_t code[2]; + mach_msg_trailer_t trailer; + } Request __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif + typedef __Request__mach_exception_raise_t __Request; + typedef __Reply__mach_exception_raise_t Reply __attribute__((unused)); + + /* + * typedef struct { + * mach_msg_header_t Head; + * NDR_record_t NDR; + * kern_return_t RetCode; + * } mig_reply_error_t; + */ + + Request *In0P = (Request *) InHeadP; + Reply *OutP = (Reply *) OutHeadP; +#ifdef __MIG_check__Request__mach_exception_raise_t__defined + kern_return_t check_result; +#endif /* __MIG_check__Request__mach_exception_raise_t__defined */ + + __DeclareRcvRpc(2405, "mach_exception_raise") + __BeforeRcvRpc(2405, "mach_exception_raise") + +#if defined(__MIG_check__Request__mach_exception_raise_t__defined) + check_result = __MIG_check__Request__mach_exception_raise_t((__Request *)In0P); + if (check_result != MACH_MSG_SUCCESS) + { MIG_RETURN_ERROR(OutP, check_result); } +#endif /* defined(__MIG_check__Request__mach_exception_raise_t__defined) */ + + OutP->RetCode = catch_mach_exception_raise(In0P->Head.msgh_request_port, In0P->thread.name, In0P->task.name, In0P->exception, In0P->code, In0P->codeCnt); + + OutP->NDR = NDR_record; + + + __AfterRcvRpc(2405, "mach_exception_raise") +} + +#if ( __MigTypeCheck ) +#if __MIG_check__Request__mach_exc_subsystem__ +#if !defined(__MIG_check__Request__mach_exception_raise_state_t__defined) +#define __MIG_check__Request__mach_exception_raise_state_t__defined + +mig_internal kern_return_t __MIG_check__Request__mach_exception_raise_state_t(__attribute__((__unused__)) __Request__mach_exception_raise_state_t *In0P, __attribute__((__unused__)) __Request__mach_exception_raise_state_t **In1PP) +{ + + typedef __Request__mach_exception_raise_state_t __Request; + __Request *In1P; +#if __MigTypeCheck + unsigned int msgh_size; +#endif /* __MigTypeCheck */ + unsigned int msgh_size_delta; + +#if __MigTypeCheck + msgh_size = In0P->Head.msgh_size; + if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || + (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) + return MIG_BAD_ARGUMENTS; +#endif /* __MigTypeCheck */ + +#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_t__codeCnt__defined) + if (In0P->NDR.int_rep != NDR_record.int_rep) + __NDR_convert__int_rep__Request__mach_exception_raise_state_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); +#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_t__codeCnt__defined */ + msgh_size_delta = (8 * In0P->codeCnt); +#if __MigTypeCheck + if ( In0P->codeCnt > 2 ) + return MIG_BAD_ARGUMENTS; + if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 8 < In0P->codeCnt) || + (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912) + (8 * In0P->codeCnt))) + return MIG_BAD_ARGUMENTS; + msgh_size -= msgh_size_delta; +#endif /* __MigTypeCheck */ + + *In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 16); + +#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_t__old_stateCnt__defined) + if (In0P->NDR.int_rep != NDR_record.int_rep) + __NDR_convert__int_rep__Request__mach_exception_raise_state_t__old_stateCnt(&In1P->old_stateCnt, In1P->NDR.int_rep); +#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_t__old_stateCnt__defined */ +#if __MigTypeCheck + if ( In1P->old_stateCnt > 224 ) + return MIG_BAD_ARGUMENTS; + if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 4 < In1P->old_stateCnt) || + (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 912) + (4 * In1P->old_stateCnt))) + return MIG_BAD_ARGUMENTS; +#endif /* __MigTypeCheck */ + + return MACH_MSG_SUCCESS; +} +#endif /* !defined(__MIG_check__Request__mach_exception_raise_state_t__defined) */ +#endif /* __MIG_check__Request__mach_exc_subsystem__ */ +#endif /* ( __MigTypeCheck ) */ + + +/* Routine mach_exception_raise_state */ +mig_internal novalue _Xmach_exception_raise_state + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) +{ + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + int64_t code[2]; + int flavor; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[224]; + mach_msg_trailer_t trailer; + } Request __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif + typedef __Request__mach_exception_raise_state_t __Request; + typedef __Reply__mach_exception_raise_state_t Reply __attribute__((unused)); + + /* + * typedef struct { + * mach_msg_header_t Head; + * NDR_record_t NDR; + * kern_return_t RetCode; + * } mig_reply_error_t; + */ + + Request *In0P = (Request *) InHeadP; + Request *In1P; + Reply *OutP = (Reply *) OutHeadP; +#ifdef __MIG_check__Request__mach_exception_raise_state_t__defined + kern_return_t check_result; +#endif /* __MIG_check__Request__mach_exception_raise_state_t__defined */ + + __DeclareRcvRpc(2406, "mach_exception_raise_state") + __BeforeRcvRpc(2406, "mach_exception_raise_state") + +#if defined(__MIG_check__Request__mach_exception_raise_state_t__defined) + check_result = __MIG_check__Request__mach_exception_raise_state_t((__Request *)In0P, (__Request **)&In1P); + if (check_result != MACH_MSG_SUCCESS) + { MIG_RETURN_ERROR(OutP, check_result); } +#endif /* defined(__MIG_check__Request__mach_exception_raise_state_t__defined) */ + + OutP->new_stateCnt = 224; + + OutP->RetCode = catch_mach_exception_raise_state(In0P->Head.msgh_request_port, In0P->exception, In0P->code, In0P->codeCnt, &In1P->flavor, In1P->old_state, In1P->old_stateCnt, OutP->new_state, &OutP->new_stateCnt); + if (OutP->RetCode != KERN_SUCCESS) { + MIG_RETURN_ERROR(OutP, OutP->RetCode); + } + + OutP->NDR = NDR_record; + + + OutP->flavor = In1P->flavor; + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 896) + (((4 * OutP->new_stateCnt))); + + __AfterRcvRpc(2406, "mach_exception_raise_state") +} + +#if ( __MigTypeCheck ) +#if __MIG_check__Request__mach_exc_subsystem__ +#if !defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) +#define __MIG_check__Request__mach_exception_raise_state_identity_t__defined + +mig_internal kern_return_t __MIG_check__Request__mach_exception_raise_state_identity_t(__attribute__((__unused__)) __Request__mach_exception_raise_state_identity_t *In0P, __attribute__((__unused__)) __Request__mach_exception_raise_state_identity_t **In1PP) +{ + + typedef __Request__mach_exception_raise_state_identity_t __Request; + __Request *In1P; +#if __MigTypeCheck + unsigned int msgh_size; +#endif /* __MigTypeCheck */ + unsigned int msgh_size_delta; + +#if __MigTypeCheck + msgh_size = In0P->Head.msgh_size; + if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || + (In0P->msgh_body.msgh_descriptor_count != 2) || + (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) + return MIG_BAD_ARGUMENTS; +#endif /* __MigTypeCheck */ + +#if __MigTypeCheck + if (In0P->thread.type != MACH_MSG_PORT_DESCRIPTOR || + In0P->thread.disposition != 17) + return MIG_TYPE_ERROR; +#endif /* __MigTypeCheck */ + +#if __MigTypeCheck + if (In0P->task.type != MACH_MSG_PORT_DESCRIPTOR || + In0P->task.disposition != 17) + return MIG_TYPE_ERROR; +#endif /* __MigTypeCheck */ + +#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__codeCnt__defined) + if (In0P->NDR.int_rep != NDR_record.int_rep) + __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); +#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__codeCnt__defined */ + msgh_size_delta = (8 * In0P->codeCnt); +#if __MigTypeCheck + if ( In0P->codeCnt > 2 ) + return MIG_BAD_ARGUMENTS; + if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 8 < In0P->codeCnt) || + (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912) + (8 * In0P->codeCnt))) + return MIG_BAD_ARGUMENTS; + msgh_size -= msgh_size_delta; +#endif /* __MigTypeCheck */ + + *In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 16); + +#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__old_stateCnt__defined) + if (In0P->NDR.int_rep != NDR_record.int_rep) + __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__old_stateCnt(&In1P->old_stateCnt, In1P->NDR.int_rep); +#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__old_stateCnt__defined */ +#if __MigTypeCheck + if ( In1P->old_stateCnt > 224 ) + return MIG_BAD_ARGUMENTS; + if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 4 < In1P->old_stateCnt) || + (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 912) + (4 * In1P->old_stateCnt))) + return MIG_BAD_ARGUMENTS; +#endif /* __MigTypeCheck */ + + return MACH_MSG_SUCCESS; +} +#endif /* !defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) */ +#endif /* __MIG_check__Request__mach_exc_subsystem__ */ +#endif /* ( __MigTypeCheck ) */ + + +/* Routine mach_exception_raise_state_identity */ +mig_internal novalue _Xmach_exception_raise_state_identity + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) +{ + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t thread; + mach_msg_port_descriptor_t task; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + int64_t code[2]; + int flavor; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[224]; + mach_msg_trailer_t trailer; + } Request __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif + typedef __Request__mach_exception_raise_state_identity_t __Request; + typedef __Reply__mach_exception_raise_state_identity_t Reply __attribute__((unused)); + + /* + * typedef struct { + * mach_msg_header_t Head; + * NDR_record_t NDR; + * kern_return_t RetCode; + * } mig_reply_error_t; + */ + + Request *In0P = (Request *) InHeadP; + Request *In1P; + Reply *OutP = (Reply *) OutHeadP; +#ifdef __MIG_check__Request__mach_exception_raise_state_identity_t__defined + kern_return_t check_result; +#endif /* __MIG_check__Request__mach_exception_raise_state_identity_t__defined */ + + __DeclareRcvRpc(2407, "mach_exception_raise_state_identity") + __BeforeRcvRpc(2407, "mach_exception_raise_state_identity") + +#if defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) + check_result = __MIG_check__Request__mach_exception_raise_state_identity_t((__Request *)In0P, (__Request **)&In1P); + if (check_result != MACH_MSG_SUCCESS) + { MIG_RETURN_ERROR(OutP, check_result); } +#endif /* defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) */ + + OutP->new_stateCnt = 224; + + OutP->RetCode = catch_mach_exception_raise_state_identity(In0P->Head.msgh_request_port, In0P->thread.name, In0P->task.name, In0P->exception, In0P->code, In0P->codeCnt, &In1P->flavor, In1P->old_state, In1P->old_stateCnt, OutP->new_state, &OutP->new_stateCnt); + if (OutP->RetCode != KERN_SUCCESS) { + MIG_RETURN_ERROR(OutP, OutP->RetCode); + } + + OutP->NDR = NDR_record; + + + OutP->flavor = In1P->flavor; + OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 896) + (((4 * OutP->new_stateCnt))); + + __AfterRcvRpc(2407, "mach_exception_raise_state_identity") +} + + + +/* Description of this subsystem, for use in direct RPC */ +const struct catch_mach_exc_subsystem catch_mach_exc_subsystem = { + mach_exc_server_routine, + 2405, + 2408, + (mach_msg_size_t)sizeof(union __ReplyUnion__catch_mach_exc_subsystem), + (vm_address_t)0, + { + { (mig_impl_routine_t) 0, + (mig_stub_routine_t) _Xmach_exception_raise, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_exception_raise_t)}, + { (mig_impl_routine_t) 0, + (mig_stub_routine_t) _Xmach_exception_raise_state, 9, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_exception_raise_state_t)}, + { (mig_impl_routine_t) 0, + (mig_stub_routine_t) _Xmach_exception_raise_state_identity, 11, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_exception_raise_state_identity_t)}, + } +}; + +mig_external boolean_t mach_exc_server + (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) +{ + /* + * typedef struct { + * mach_msg_header_t Head; + * NDR_record_t NDR; + * kern_return_t RetCode; + * } mig_reply_error_t; + */ + + register mig_routine_t routine; + + OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0); + OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port; + /* Minimal size: routine() will update it if different */ + OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t); + OutHeadP->msgh_local_port = MACH_PORT_NULL; + OutHeadP->msgh_id = InHeadP->msgh_id + 100; + + if ((InHeadP->msgh_id > 2407) || (InHeadP->msgh_id < 2405) || + ((routine = catch_mach_exc_subsystem.routine[InHeadP->msgh_id - 2405].stub_routine) == 0)) { + ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record; + ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID; + return FALSE; + } + (*routine) (InHeadP, OutHeadP); + return TRUE; +} + +mig_external mig_routine_t mach_exc_server_routine + (mach_msg_header_t *InHeadP) +{ + register int msgh_id; + + msgh_id = InHeadP->msgh_id - 2405; + + if ((msgh_id > 2) || (msgh_id < 0)) + return 0; + + return catch_mach_exc_subsystem.routine[msgh_id].stub_routine; +} + +#endif + diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h new file mode 100644 index 0000000..766ba11 --- /dev/null +++ b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h @@ -0,0 +1,298 @@ +#ifndef _mach_exc_server_ +#define _mach_exc_server_ + +/* Module mach_exc */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* BEGIN VOUCHER CODE */ + +#ifndef KERNEL +#if defined(__has_include) +#if __has_include() +#ifndef USING_VOUCHERS +#define USING_VOUCHERS +#endif +#ifndef __VOUCHER_FORWARD_TYPE_DECLS__ +#define __VOUCHER_FORWARD_TYPE_DECLS__ +#ifdef __cplusplus +extern "C" { +#endif + extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import)); +#ifdef __cplusplus +} +#endif +#endif // __VOUCHER_FORWARD_TYPE_DECLS__ +#endif // __has_include() +#endif // __has_include +#endif // !KERNEL + +/* END VOUCHER CODE */ + + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef mach_exc_MSG_COUNT +#define mach_exc_MSG_COUNT 3 +#endif /* mach_exc_MSG_COUNT */ + +#include +#include +#include +#include + +#ifdef __BeforeMigServerHeader +__BeforeMigServerHeader +#endif /* __BeforeMigServerHeader */ + + +/* Routine mach_exception_raise */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t catch_mach_exception_raise +( + mach_port_t exception_port, + mach_port_t thread, + mach_port_t task, + exception_type_t exception, + mach_exception_data_t code, + mach_msg_type_number_t codeCnt +); + +/* Routine mach_exception_raise_state */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t catch_mach_exception_raise_state +( + mach_port_t exception_port, + exception_type_t exception, + const mach_exception_data_t code, + mach_msg_type_number_t codeCnt, + int *flavor, + const thread_state_t old_state, + mach_msg_type_number_t old_stateCnt, + thread_state_t new_state, + mach_msg_type_number_t *new_stateCnt +); + +/* Routine mach_exception_raise_state_identity */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t catch_mach_exception_raise_state_identity +( + mach_port_t exception_port, + mach_port_t thread, + mach_port_t task, + exception_type_t exception, + mach_exception_data_t code, + mach_msg_type_number_t codeCnt, + int *flavor, + thread_state_t old_state, + mach_msg_type_number_t old_stateCnt, + thread_state_t new_state, + mach_msg_type_number_t *new_stateCnt +); + +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +boolean_t mach_exc_server( + mach_msg_header_t *InHeadP, + mach_msg_header_t *OutHeadP); + +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +mig_routine_t mach_exc_server_routine( + mach_msg_header_t *InHeadP); + + +/* Description of this subsystem, for use in direct RPC */ +extern const struct catch_mach_exc_subsystem { + mig_server_routine_t server; /* Server routine */ + mach_msg_id_t start; /* Min routine number */ + mach_msg_id_t end; /* Max routine number + 1 */ + unsigned int maxsize; /* Max msg size */ + vm_address_t reserved; /* Reserved */ + struct routine_descriptor /*Array of routine descriptors */ + routine[3]; +} catch_mach_exc_subsystem; + +/* typedefs for all requests */ + +#ifndef __Request__mach_exc_subsystem__defined +#define __Request__mach_exc_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t thread; + mach_msg_port_descriptor_t task; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + int64_t code[2]; + } __Request__mach_exception_raise_t __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + int64_t code[2]; + int flavor; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[224]; + } __Request__mach_exception_raise_state_t __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t thread; + mach_msg_port_descriptor_t task; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + int64_t code[2]; + int flavor; + mach_msg_type_number_t old_stateCnt; + natural_t old_state[224]; + } __Request__mach_exception_raise_state_identity_t __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Request__mach_exc_subsystem__defined */ + + +/* union of all requests */ + +#ifndef __RequestUnion__catch_mach_exc_subsystem__defined +#define __RequestUnion__catch_mach_exc_subsystem__defined +union __RequestUnion__catch_mach_exc_subsystem { + __Request__mach_exception_raise_t Request_mach_exception_raise; + __Request__mach_exception_raise_state_t Request_mach_exception_raise_state; + __Request__mach_exception_raise_state_identity_t Request_mach_exception_raise_state_identity; +}; +#endif /* __RequestUnion__catch_mach_exc_subsystem__defined */ +/* typedefs for all replies */ + +#ifndef __Reply__mach_exc_subsystem__defined +#define __Reply__mach_exc_subsystem__defined + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } __Reply__mach_exception_raise_t __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + int flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[224]; + } __Reply__mach_exception_raise_state_t __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + int flavor; + mach_msg_type_number_t new_stateCnt; + natural_t new_state[224]; + } __Reply__mach_exception_raise_state_identity_t __attribute__((unused)); +#ifdef __MigPackStructs +#pragma pack() +#endif +#endif /* !__Reply__mach_exc_subsystem__defined */ + + +/* union of all replies */ + +#ifndef __ReplyUnion__catch_mach_exc_subsystem__defined +#define __ReplyUnion__catch_mach_exc_subsystem__defined +union __ReplyUnion__catch_mach_exc_subsystem { + __Reply__mach_exception_raise_t Reply_mach_exception_raise; + __Reply__mach_exception_raise_state_t Reply_mach_exception_raise_state; + __Reply__mach_exception_raise_state_identity_t Reply_mach_exception_raise_state_identity; +}; +#endif /* __RequestUnion__catch_mach_exc_subsystem__defined */ + +#ifndef subsystem_to_name_map_mach_exc +#define subsystem_to_name_map_mach_exc \ + { "mach_exception_raise", 2405 },\ + { "mach_exception_raise_state", 2406 },\ + { "mach_exception_raise_state_identity", 2407 } +#endif + +#ifdef __AfterMigServerHeader +__AfterMigServerHeader +#endif /* __AfterMigServerHeader */ + +#endif /* _mach_exc_server_ */ diff --git a/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift b/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift index 306d4ce..2e58fdf 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift @@ -2,7 +2,7 @@ import Foundation /// Protocol for the assertion handler that Nimble uses for all expectations. public protocol AssertionHandler { - func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) + func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) } /// Global backing interface for assertions that Nimble creates. diff --git a/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift b/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift index 09caf2a..2e30f61 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift @@ -12,7 +12,7 @@ public class AssertionDispatcher: AssertionHandler { self.handlers = handlers } - public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { + public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { for handler in handlers { handler.assert(assertion, message: message, location: location) } diff --git a/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift b/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift index a1615a7..7d0bab2 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift @@ -28,7 +28,7 @@ public class AssertionRecorder : AssertionHandler { public init() {} - public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { + public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { assertions.append( AssertionRecord( success: assertion, @@ -43,7 +43,7 @@ public class AssertionRecorder : AssertionHandler { /// Once the closure finishes, then the original Nimble assertion handler is restored. /// /// @see AssertionHandler -public func withAssertionHandler(tempAssertionHandler: AssertionHandler, closure: () throws -> Void) { +public func withAssertionHandler(_ tempAssertionHandler: AssertionHandler, closure: @escaping () throws -> Void) { let environment = NimbleEnvironment.activeInstance let oldRecorder = environment.assertionHandler let capturer = NMBExceptionCapture(handler: nil, finally: ({ @@ -65,7 +65,7 @@ public func withAssertionHandler(tempAssertionHandler: AssertionHandler, closure /// assertion handler when this is true. Defaults to false. /// /// @see gatherFailingExpectations -public func gatherExpectations(silently silently: Bool = false, closure: () -> Void) -> [AssertionRecord] { +public func gatherExpectations(silently: Bool = false, closure: @escaping () -> Void) -> [AssertionRecord] { let previousRecorder = NimbleEnvironment.activeInstance.assertionHandler let recorder = AssertionRecorder() let handlers: [AssertionHandler] @@ -92,7 +92,7 @@ public func gatherExpectations(silently silently: Bool = false, closure: () -> V /// /// @see gatherExpectations /// @see raiseException source for an example use case. -public func gatherFailingExpectations(silently silently: Bool = false, closure: () -> Void) -> [AssertionRecord] { +public func gatherFailingExpectations(silently: Bool = false, closure: @escaping () -> Void) -> [AssertionRecord] { let assertions = gatherExpectations(silently: silently, closure: closure) return assertions.filter { assertion in !assertion.success diff --git a/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBExpectation.swift b/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift similarity index 87% rename from Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBExpectation.swift rename to Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift index 3f18d06..47d4eed 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBExpectation.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift @@ -5,14 +5,14 @@ import Foundation internal struct ObjCMatcherWrapper : Matcher { let matcher: NMBMatcher - func matches(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + func matches(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { return matcher.matches( ({ try! actualExpression.evaluate() }), failureMessage: failureMessage, location: actualExpression.location) } - func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { return matcher.doesNotMatch( ({ try! actualExpression.evaluate() }), failureMessage: failureMessage, @@ -26,9 +26,9 @@ public class NMBExpectation : NSObject { internal var _negative: Bool internal let _file: FileString internal let _line: UInt - internal var _timeout: NSTimeInterval = 1.0 + internal var _timeout: TimeInterval = 1.0 - public init(actualBlock: () -> NSObject!, negative: Bool, file: FileString, line: UInt) { + public init(actualBlock: @escaping () -> NSObject!, negative: Bool, file: FileString, line: UInt) { self._actualBlock = actualBlock self._negative = negative self._file = file @@ -41,7 +41,7 @@ public class NMBExpectation : NSObject { } } - public var withTimeout: (NSTimeInterval) -> NMBExpectation { + public var withTimeout: (TimeInterval) -> NMBExpectation { return ({ timeout in self._timeout = timeout return self }) @@ -123,7 +123,7 @@ public class NMBExpectation : NSObject { public var toNotEventuallyWithDescription: (NMBMatcher, String) -> Void { return toEventuallyNotWithDescription } - public class func failWithMessage(message: String, file: FileString, line: UInt) { + public class func failWithMessage(_ message: String, file: FileString, line: UInt) { fail(message, location: SourceLocation(file: file, line: line)) } } diff --git a/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBObjCMatcher.swift b/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift similarity index 55% rename from Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBObjCMatcher.swift rename to Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift index 9f31d42..c609f69 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBObjCMatcher.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift @@ -2,43 +2,43 @@ import Foundation #if _runtime(_ObjC) -public typealias MatcherBlock = (actualExpression: Expression, failureMessage: FailureMessage) -> Bool -public typealias FullMatcherBlock = (actualExpression: Expression, failureMessage: FailureMessage, shouldNotMatch: Bool) -> Bool +public typealias MatcherBlock = (_ actualExpression: Expression, _ failureMessage: FailureMessage) -> Bool +public typealias FullMatcherBlock = (_ actualExpression: Expression, _ failureMessage: FailureMessage, _ shouldNotMatch: Bool) -> Bool public class NMBObjCMatcher : NSObject, NMBMatcher { let _match: MatcherBlock let _doesNotMatch: MatcherBlock let canMatchNil: Bool - public init(canMatchNil: Bool, matcher: MatcherBlock, notMatcher: MatcherBlock) { + public init(canMatchNil: Bool, matcher: @escaping MatcherBlock, notMatcher: @escaping MatcherBlock) { self.canMatchNil = canMatchNil self._match = matcher self._doesNotMatch = notMatcher } - public convenience init(matcher: MatcherBlock) { + public convenience init(matcher: @escaping MatcherBlock) { self.init(canMatchNil: true, matcher: matcher) } - public convenience init(canMatchNil: Bool, matcher: MatcherBlock) { + public convenience init(canMatchNil: Bool, matcher: @escaping MatcherBlock) { self.init(canMatchNil: canMatchNil, matcher: matcher, notMatcher: ({ actualExpression, failureMessage in - return !matcher(actualExpression: actualExpression, failureMessage: failureMessage) + return !matcher(actualExpression, failureMessage) })) } - public convenience init(matcher: FullMatcherBlock) { + public convenience init(matcher: @escaping FullMatcherBlock) { self.init(canMatchNil: true, matcher: matcher) } - public convenience init(canMatchNil: Bool, matcher: FullMatcherBlock) { + public convenience init(canMatchNil: Bool, matcher: @escaping FullMatcherBlock) { self.init(canMatchNil: canMatchNil, matcher: ({ actualExpression, failureMessage in - return matcher(actualExpression: actualExpression, failureMessage: failureMessage, shouldNotMatch: false) + return matcher(actualExpression, failureMessage, false) }), notMatcher: ({ actualExpression, failureMessage in - return matcher(actualExpression: actualExpression, failureMessage: failureMessage, shouldNotMatch: true) + return matcher(actualExpression, failureMessage, true) })) } - private func canMatch(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + private func canMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { do { if !canMatchNil { if try actualExpression.evaluate() == nil { @@ -53,11 +53,11 @@ public class NMBObjCMatcher : NSObject, NMBMatcher { return true } - public func matches(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + public func matches(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { let expr = Expression(expression: actualBlock, location: location) let result = _match( - actualExpression: expr, - failureMessage: failureMessage) + expr, + failureMessage) if self.canMatch(Expression(expression: actualBlock, location: location), failureMessage: failureMessage) { return result } else { @@ -65,11 +65,11 @@ public class NMBObjCMatcher : NSObject, NMBMatcher { } } - public func doesNotMatch(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + public func doesNotMatch(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { let expr = Expression(expression: actualBlock, location: location) let result = _doesNotMatch( - actualExpression: expr, - failureMessage: failureMessage) + expr, + failureMessage) if self.canMatch(Expression(expression: actualBlock, location: location), failureMessage: failureMessage) { return result } else { diff --git a/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift b/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift index 27cdac9..a55cb27 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift @@ -1,3 +1,4 @@ +import Dispatch import Foundation /// "Global" state of Nimble is stored here. Only DSL functions should access / be aware of this @@ -5,7 +6,7 @@ import Foundation internal class NimbleEnvironment { static var activeInstance: NimbleEnvironment { get { - let env = NSThread.currentThread().threadDictionary["NimbleEnvironment"] + let env = Thread.current.threadDictionary["NimbleEnvironment"] if let env = env as? NimbleEnvironment { return env } else { @@ -15,7 +16,7 @@ internal class NimbleEnvironment { } } set { - NSThread.currentThread().threadDictionary["NimbleEnvironment"] = newValue + Thread.current.threadDictionary["NimbleEnvironment"] = newValue } } @@ -25,14 +26,20 @@ internal class NimbleEnvironment { set { NimbleAssertionHandler = newValue } } -#if _runtime(_ObjC) + var suppressTVOSAssertionWarning: Bool = false var awaiter: Awaiter init() { + let timeoutQueue: DispatchQueue + if #available(OSX 10.10, *) { + timeoutQueue = DispatchQueue.global(qos: .userInitiated) + } else { + timeoutQueue = DispatchQueue.global(priority: .high) + } + awaiter = Awaiter( waitLock: AssertionWaitLock(), - asyncQueue: dispatch_get_main_queue(), - timeoutQueue: dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0)) + asyncQueue: .main, + timeoutQueue: timeoutQueue) } -#endif } diff --git a/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift b/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift index 7d84f45..1aba8bc 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift @@ -4,7 +4,7 @@ import XCTest /// Default handler for Nimble. This assertion handler passes failures along to /// XCTest. public class NimbleXCTestHandler : AssertionHandler { - public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { + public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { if !assertion { recordFailure("\(message.stringValue)\n", location: location) } @@ -14,7 +14,7 @@ public class NimbleXCTestHandler : AssertionHandler { /// Alternative handler for Nimble. This assertion handler passes failures along /// to XCTest by attempting to reduce the failure message size. public class NimbleShortXCTestHandler: AssertionHandler { - public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { + public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { if !assertion { let msg: String if let actual = message.actualValue { @@ -30,7 +30,7 @@ public class NimbleShortXCTestHandler: AssertionHandler { /// Fallback handler in case XCTest is unavailable. This assertion handler will abort /// the program if it is invoked. class NimbleXCTestUnavailableHandler : AssertionHandler { - func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { + func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { fatalError("XCTest is not available and no custom assertion handler was configured. Aborting.") } } @@ -42,11 +42,11 @@ class NimbleXCTestUnavailableHandler : AssertionHandler { private(set) var currentTestCase: XCTestCase? - @objc func testCaseWillStart(testCase: XCTestCase) { + @objc func testCaseWillStart(_ testCase: XCTestCase) { currentTestCase = testCase } - @objc func testCaseDidFinish(testCase: XCTestCase) { + @objc func testCaseDidFinish(_ testCase: XCTestCase) { currentTestCase = nil } } @@ -62,14 +62,14 @@ func isXCTestAvailable() -> Bool { #endif } -private func recordFailure(message: String, location: SourceLocation) { +private func recordFailure(_ message: String, location: SourceLocation) { #if _runtime(_ObjC) if let testCase = CurrentTestCaseTracker.sharedInstance.currentTestCase { - testCase.recordFailureWithDescription(message, inFile: location.file, atLine: location.line, expected: true) + testCase.recordFailure(withDescription: message, inFile: location.file, atLine: location.line, expected: true) } else { let msg = "Attempted to report a test failure to XCTest while no test case was running. " + "The failure was:\n\"\(message)\"\nIt occurred at: \(location.file):\(location.line)" - NSException(name: NSInternalInconsistencyException, reason: msg, userInfo: nil).raise() + NSException(name: .internalInconsistencyException, reason: msg, userInfo: nil).raise() } #else XCTFail("\(message)\n", file: location.file, line: location.line) diff --git a/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/DSL.h b/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/DSL.h deleted file mode 100644 index a499059..0000000 --- a/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/DSL.h +++ /dev/null @@ -1,145 +0,0 @@ -#import - -@class NMBExpectation; -@class NMBObjCBeCloseToMatcher; -@class NMBObjCRaiseExceptionMatcher; -@protocol NMBMatcher; - - -#define NIMBLE_EXPORT FOUNDATION_EXPORT - -#ifdef NIMBLE_DISABLE_SHORT_SYNTAX -#define NIMBLE_SHORT(PROTO, ORIGINAL) -#else -#define NIMBLE_SHORT(PROTO, ORIGINAL) FOUNDATION_STATIC_INLINE PROTO { return (ORIGINAL); } -#endif - -NIMBLE_EXPORT NMBExpectation *NMB_expect(id(^actualBlock)(), NSString *file, NSUInteger line); -NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(), NSString *file, NSUInteger line); - -NIMBLE_EXPORT id NMB_equal(id expectedValue); -NIMBLE_SHORT(id equal(id expectedValue), - NMB_equal(expectedValue)); - -NIMBLE_EXPORT id NMB_haveCount(id expectedValue); -NIMBLE_SHORT(id haveCount(id expectedValue), - NMB_haveCount(expectedValue)); - -NIMBLE_EXPORT NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue); -NIMBLE_SHORT(NMBObjCBeCloseToMatcher *beCloseTo(id expectedValue), - NMB_beCloseTo(expectedValue)); - -NIMBLE_EXPORT id NMB_beAnInstanceOf(Class expectedClass); -NIMBLE_SHORT(id beAnInstanceOf(Class expectedClass), - NMB_beAnInstanceOf(expectedClass)); - -NIMBLE_EXPORT id NMB_beAKindOf(Class expectedClass); -NIMBLE_SHORT(id beAKindOf(Class expectedClass), - NMB_beAKindOf(expectedClass)); - -NIMBLE_EXPORT id NMB_beginWith(id itemElementOrSubstring); -NIMBLE_SHORT(id beginWith(id itemElementOrSubstring), - NMB_beginWith(itemElementOrSubstring)); - -NIMBLE_EXPORT id NMB_beGreaterThan(NSNumber *expectedValue); -NIMBLE_SHORT(id beGreaterThan(NSNumber *expectedValue), - NMB_beGreaterThan(expectedValue)); - -NIMBLE_EXPORT id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue); -NIMBLE_SHORT(id beGreaterThanOrEqualTo(NSNumber *expectedValue), - NMB_beGreaterThanOrEqualTo(expectedValue)); - -NIMBLE_EXPORT id NMB_beIdenticalTo(id expectedInstance); -NIMBLE_SHORT(id beIdenticalTo(id expectedInstance), - NMB_beIdenticalTo(expectedInstance)); - -NIMBLE_EXPORT id NMB_be(id expectedInstance); -NIMBLE_SHORT(id be(id expectedInstance), - NMB_be(expectedInstance)); - -NIMBLE_EXPORT id NMB_beLessThan(NSNumber *expectedValue); -NIMBLE_SHORT(id beLessThan(NSNumber *expectedValue), - NMB_beLessThan(expectedValue)); - -NIMBLE_EXPORT id NMB_beLessThanOrEqualTo(NSNumber *expectedValue); -NIMBLE_SHORT(id beLessThanOrEqualTo(NSNumber *expectedValue), - NMB_beLessThanOrEqualTo(expectedValue)); - -NIMBLE_EXPORT id NMB_beTruthy(void); -NIMBLE_SHORT(id beTruthy(void), - NMB_beTruthy()); - -NIMBLE_EXPORT id NMB_beFalsy(void); -NIMBLE_SHORT(id beFalsy(void), - NMB_beFalsy()); - -NIMBLE_EXPORT id NMB_beTrue(void); -NIMBLE_SHORT(id beTrue(void), - NMB_beTrue()); - -NIMBLE_EXPORT id NMB_beFalse(void); -NIMBLE_SHORT(id beFalse(void), - NMB_beFalse()); - -NIMBLE_EXPORT id NMB_beNil(void); -NIMBLE_SHORT(id beNil(void), - NMB_beNil()); - -NIMBLE_EXPORT id NMB_beEmpty(void); -NIMBLE_SHORT(id beEmpty(void), - NMB_beEmpty()); - -NIMBLE_EXPORT id NMB_containWithNilTermination(id itemOrSubstring, ...) NS_REQUIRES_NIL_TERMINATION; -#define NMB_contain(...) NMB_containWithNilTermination(__VA_ARGS__, nil) -#ifndef NIMBLE_DISABLE_SHORT_SYNTAX -#define contain(...) NMB_contain(__VA_ARGS__) -#endif - -NIMBLE_EXPORT id NMB_endWith(id itemElementOrSubstring); -NIMBLE_SHORT(id endWith(id itemElementOrSubstring), - NMB_endWith(itemElementOrSubstring)); - -NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException(void); -NIMBLE_SHORT(NMBObjCRaiseExceptionMatcher *raiseException(void), - NMB_raiseException()); - -NIMBLE_EXPORT id NMB_match(id expectedValue); -NIMBLE_SHORT(id match(id expectedValue), - NMB_match(expectedValue)); - -NIMBLE_EXPORT id NMB_allPass(id matcher); -NIMBLE_SHORT(id allPass(id matcher), - NMB_allPass(matcher)); - -NIMBLE_EXPORT id NMB_satisfyAnyOfWithMatchers(id matchers); -#define NMB_satisfyAnyOf(...) NMB_satisfyAnyOfWithMatchers(@[__VA_ARGS__]) -#ifndef NIMBLE_DISABLE_SHORT_SYNTAX -#define satisfyAnyOf(...) NMB_satisfyAnyOf(__VA_ARGS__) -#endif - -// In order to preserve breakpoint behavior despite using macros to fill in __FILE__ and __LINE__, -// define a builder that populates __FILE__ and __LINE__, and returns a block that takes timeout -// and action arguments. See https://github.com/Quick/Quick/pull/185 for details. -typedef void (^NMBWaitUntilTimeoutBlock)(NSTimeInterval timeout, void (^action)(void (^)(void))); -typedef void (^NMBWaitUntilBlock)(void (^action)(void (^)(void))); - -NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line); - -NIMBLE_EXPORT NMBWaitUntilTimeoutBlock NMB_waitUntilTimeoutBuilder(NSString *file, NSUInteger line); -NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger line); - -NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line); - -#define NMB_waitUntilTimeout NMB_waitUntilTimeoutBuilder(@(__FILE__), __LINE__) -#define NMB_waitUntil NMB_waitUntilBuilder(@(__FILE__), __LINE__) - -#ifndef NIMBLE_DISABLE_SHORT_SYNTAX -#define expect(...) NMB_expect(^id{ return (__VA_ARGS__); }, @(__FILE__), __LINE__) -#define expectAction(BLOCK) NMB_expectAction((BLOCK), @(__FILE__), __LINE__) -#define failWithMessage(msg) NMB_failWithMessage(msg, @(__FILE__), __LINE__) -#define fail() failWithMessage(@"fail() always fails") - - -#define waitUntilTimeout NMB_waitUntilTimeout -#define waitUntil NMB_waitUntil -#endif diff --git a/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBExceptionCapture.h b/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBExceptionCapture.h deleted file mode 100644 index 7e5fb07..0000000 --- a/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBExceptionCapture.h +++ /dev/null @@ -1,11 +0,0 @@ -#import -#import - -@interface NMBExceptionCapture : NSObject - -- (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally; -- (void)tryBlock:(void(^)())unsafeBlock; - -@end - -typedef void(^NMBSourceCallbackBlock)(BOOL successful); diff --git a/Pods/Nimble/Sources/Nimble/DSL+Wait.swift b/Pods/Nimble/Sources/Nimble/DSL+Wait.swift index 9124964..619b6dc 100644 --- a/Pods/Nimble/Sources/Nimble/DSL+Wait.swift +++ b/Pods/Nimble/Sources/Nimble/DSL+Wait.swift @@ -1,10 +1,10 @@ +import Dispatch import Foundation -#if _runtime(_ObjC) private enum ErrorResult { - case Exception(NSException) - case Error(ErrorType) - case None + case exception(NSException) + case error(Error) + case none } /// Only classes, protocols, methods, properties, and subscript declarations can be @@ -12,71 +12,77 @@ private enum ErrorResult { /// asynchronous waiting logic so that it may be called from Objective-C and Swift. internal class NMBWait: NSObject { internal class func until( - timeout timeout: NSTimeInterval, + timeout: TimeInterval, file: FileString = #file, line: UInt = #line, - action: (() -> Void) -> Void) -> Void { - return throwableUntil(timeout: timeout, file: file, line: line) { (done: () -> Void) throws -> Void in - action() { done() } + action: @escaping (@escaping () -> Void) -> Void) -> Void { + return throwableUntil(timeout: timeout, file: file, line: line) { done in + action(done) } } // Using a throwable closure makes this method not objc compatible. internal class func throwableUntil( - timeout timeout: NSTimeInterval, + timeout: TimeInterval, file: FileString = #file, line: UInt = #line, - action: (() -> Void) throws -> Void) -> Void { + action: @escaping (@escaping () -> Void) throws -> Void) -> Void { let awaiter = NimbleEnvironment.activeInstance.awaiter let leeway = timeout / 2.0 - let result = awaiter.performBlock { (done: (ErrorResult) -> Void) throws -> Void in - dispatch_async(dispatch_get_main_queue()) { + let result = awaiter.performBlock { (done: @escaping (ErrorResult) -> Void) throws -> Void in + DispatchQueue.main.async { let capture = NMBExceptionCapture( handler: ({ exception in - done(.Exception(exception)) + done(.exception(exception)) }), finally: ({ }) ) capture.tryBlock { do { try action() { - done(.None) + done(.none) } } catch let e { - done(.Error(e)) + done(.error(e)) } } } }.timeout(timeout, forcefullyAbortTimeout: leeway).wait("waitUntil(...)", file: file, line: line) switch result { - case .Incomplete: internalError("Reached .Incomplete state for waitUntil(...).") - case .BlockedRunLoop: + case .incomplete: internalError("Reached .incomplete state for waitUntil(...).") + case .blockedRunLoop: fail(blockedRunLoopErrorMessageFor("-waitUntil()", leeway: leeway), file: file, line: line) - case .TimedOut: + case .timedOut: let pluralize = (timeout == 1 ? "" : "s") fail("Waited more than \(timeout) second\(pluralize)", file: file, line: line) - case let .RaisedException(exception): + case let .raisedException(exception): fail("Unexpected exception raised: \(exception)") - case let .ErrorThrown(error): + case let .errorThrown(error): fail("Unexpected error thrown: \(error)") - case .Completed(.Exception(let exception)): + case .completed(.exception(let exception)): fail("Unexpected exception raised: \(exception)") - case .Completed(.Error(let error)): + case .completed(.error(let error)): fail("Unexpected error thrown: \(error)") - case .Completed(.None): // success + case .completed(.none): // success break } } + #if _runtime(_ObjC) @objc(untilFile:line:action:) - internal class func until(file: FileString = #file, line: UInt = #line, action: (() -> Void) -> Void) -> Void { + internal class func until(_ file: FileString = #file, line: UInt = #line, action: @escaping (() -> Void) -> Void) -> Void { until(timeout: 1, file: file, line: line, action: action) } + #else + internal class func until(_ file: FileString = #file, line: UInt = #line, action: @escaping (() -> Void) -> Void) -> Void { + until(timeout: 1, file: file, line: line, action: action) + } + #endif } -internal func blockedRunLoopErrorMessageFor(fnName: String, leeway: NSTimeInterval) -> String { +internal func blockedRunLoopErrorMessageFor(_ fnName: String, leeway: TimeInterval) -> String { return "\(fnName) timed out but was unable to run the timeout handler because the main thread is unresponsive (\(leeway) seconds is allow after the wait times out). Conditions that may cause this include processing blocking IO on the main thread, calls to sleep(), deadlocks, and synchronous IPC. Nimble forcefully stopped run loop which may cause future failures in test run." } @@ -87,7 +93,6 @@ internal func blockedRunLoopErrorMessageFor(fnName: String, leeway: NSTimeInterv /// /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. -public func waitUntil(timeout timeout: NSTimeInterval = 1, file: FileString = #file, line: UInt = #line, action: (() -> Void) -> Void) -> Void { +public func waitUntil(timeout: TimeInterval = 1, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void) -> Void { NMBWait.until(timeout: timeout, file: file, line: line, action: action) } -#endif diff --git a/Pods/Nimble/Sources/Nimble/DSL.swift b/Pods/Nimble/Sources/Nimble/DSL.swift index b43a933..7ebd684 100644 --- a/Pods/Nimble/Sources/Nimble/DSL.swift +++ b/Pods/Nimble/Sources/Nimble/DSL.swift @@ -1,8 +1,7 @@ import Foundation /// Make an expectation on a given actual value. The value given is lazily evaluated. -@warn_unused_result(message="Follow 'expect(…)' with '.to(…)', '.toNot(…)', 'toEventually(…)', '==', etc.") -public func expect(@autoclosure(escaping) expression: () throws -> T?, file: FileString = #file, line: UInt = #line) -> Expectation { +public func expect(_ expression: @autoclosure @escaping () throws -> T?, file: FileString = #file, line: UInt = #line) -> Expectation { return Expectation( expression: Expression( expression: expression, @@ -11,8 +10,7 @@ public func expect(@autoclosure(escaping) expression: () throws -> T?, file: } /// Make an expectation on a given actual value. The closure is lazily invoked. -@warn_unused_result(message="Follow 'expect(…)' with '.to(…)', '.toNot(…)', 'toEventually(…)', '==', etc.") -public func expect(file: FileString = #file, line: UInt = #line, expression: () throws -> T?) -> Expectation { +public func expect(_ file: FileString = #file, line: UInt = #line, expression: @escaping () throws -> T?) -> Expectation { return Expectation( expression: Expression( expression: expression, @@ -21,33 +19,33 @@ public func expect(file: FileString = #file, line: UInt = #line, expression: } /// Always fails the test with a message and a specified location. -public func fail(message: String, location: SourceLocation) { +public func fail(_ message: String, location: SourceLocation) { let handler = NimbleEnvironment.activeInstance.assertionHandler handler.assert(false, message: FailureMessage(stringValue: message), location: location) } /// Always fails the test with a message. -public func fail(message: String, file: FileString = #file, line: UInt = #line) { +public func fail(_ message: String, file: FileString = #file, line: UInt = #line) { fail(message, location: SourceLocation(file: file, line: line)) } /// Always fails the test. -public func fail(file: FileString = #file, line: UInt = #line) { +public func fail(_ file: FileString = #file, line: UInt = #line) { fail("fail() always fails", file: file, line: line) } /// Like Swift's precondition(), but raises NSExceptions instead of sigaborts internal func nimblePrecondition( - @autoclosure expr: () -> Bool, - @autoclosure _ name: () -> String, - @autoclosure _ message: () -> String, + _ expr: @autoclosure() -> Bool, + _ name: @autoclosure() -> String, + _ message: @autoclosure() -> String, file: StaticString = #file, - line: UInt = #line) -> Bool { + line: UInt = #line) { let result = expr() if !result { #if _runtime(_ObjC) let e = NSException( - name: name(), + name: NSExceptionName(name()), reason: message(), userInfo: nil) e.raise() @@ -55,14 +53,12 @@ internal func nimblePrecondition( preconditionFailure("\(name()) - \(message())", file: file, line: line) #endif } - return result } -@noreturn -internal func internalError(msg: String, file: FileString = #file, line: UInt = #line) { +internal func internalError(_ msg: String, file: FileString = #file, line: UInt = #line) -> Never { fatalError( "Nimble Bug Found: \(msg) at \(file):\(line).\n" + "Please file a bug to Nimble: https://github.com/Quick/Nimble/issues with the " + "code snippet that caused this error." ) -} \ No newline at end of file +} diff --git a/Pods/Nimble/Sources/Nimble/Expectation.swift b/Pods/Nimble/Sources/Nimble/Expectation.swift index 5baf258..16d7c3b 100644 --- a/Pods/Nimble/Sources/Nimble/Expectation.swift +++ b/Pods/Nimble/Sources/Nimble/Expectation.swift @@ -1,6 +1,8 @@ import Foundation -internal func expressionMatches(expression: Expression, matcher: U, to: String, description: String?) -> (Bool, FailureMessage) { +internal func expressionMatches(_ expression: Expression, matcher: U, to: String, description: String?) -> (Bool, FailureMessage) + where U: Matcher, U.ValueType == T +{ let msg = FailureMessage() msg.userDescription = description msg.to = to @@ -16,7 +18,9 @@ internal func expressionMatches(express } } -internal func expressionDoesNotMatch(expression: Expression, matcher: U, toNot: String, description: String?) -> (Bool, FailureMessage) { +internal func expressionDoesNotMatch(_ expression: Expression, matcher: U, toNot: String, description: String?) -> (Bool, FailureMessage) + where U: Matcher, U.ValueType == T +{ let msg = FailureMessage() msg.userDescription = description msg.to = toNot @@ -36,19 +40,23 @@ public struct Expectation { public let expression: Expression - public func verify(pass: Bool, _ message: FailureMessage) { + public func verify(_ pass: Bool, _ message: FailureMessage) { let handler = NimbleEnvironment.activeInstance.assertionHandler handler.assert(pass, message: message, location: expression.location) } /// Tests the actual value using a matcher to match. - public func to(matcher: U, description: String? = nil) { + public func to(_ matcher: U, description: String? = nil) + where U: Matcher, U.ValueType == T + { let (pass, msg) = expressionMatches(expression, matcher: matcher, to: "to", description: description) verify(pass, msg) } /// Tests the actual value using a matcher to not match. - public func toNot(matcher: U, description: String? = nil) { + public func toNot(_ matcher: U, description: String? = nil) + where U: Matcher, U.ValueType == T + { let (pass, msg) = expressionDoesNotMatch(expression, matcher: matcher, toNot: "to not", description: description) verify(pass, msg) } @@ -56,7 +64,9 @@ public struct Expectation { /// Tests the actual value using a matcher to not match. /// /// Alias to toNot(). - public func notTo(matcher: U, description: String? = nil) { + public func notTo(_ matcher: U, description: String? = nil) + where U: Matcher, U.ValueType == T + { toNot(matcher, description: description) } diff --git a/Pods/Nimble/Sources/Nimble/Expression.swift b/Pods/Nimble/Sources/Nimble/Expression.swift index f64ee24..8ba53e4 100644 --- a/Pods/Nimble/Sources/Nimble/Expression.swift +++ b/Pods/Nimble/Sources/Nimble/Expression.swift @@ -2,7 +2,7 @@ import Foundation // Memoizes the given closure, only calling the passed // closure once; even if repeat calls to the returned closure -internal func memoizedClosure(closure: () throws -> T) -> (Bool) throws -> T { +internal func memoizedClosure(_ closure: @escaping () throws -> T) -> (Bool) throws -> T { var cache: T? return ({ withoutCaching in if (withoutCaching || cache == nil) { @@ -40,7 +40,7 @@ public struct Expression { /// requires an explicit closure. This gives Nimble /// flexibility if @autoclosure behavior changes between /// Swift versions. Nimble internals always sets this true. - public init(expression: () throws -> T?, location: SourceLocation, isClosure: Bool = true) { + public init(expression: @escaping () throws -> T?, location: SourceLocation, isClosure: Bool = true) { self._expression = memoizedClosure(expression) self.location = location self._withoutCaching = false @@ -61,7 +61,7 @@ public struct Expression { /// requires an explicit closure. This gives Nimble /// flexibility if @autoclosure behavior changes between /// Swift versions. Nimble internals always sets this true. - public init(memoizedExpression: (Bool) throws -> T?, location: SourceLocation, withoutCaching: Bool, isClosure: Bool = true) { + public init(memoizedExpression: @escaping (Bool) throws -> T?, location: SourceLocation, withoutCaching: Bool, isClosure: Bool = true) { self._expression = memoizedExpression self.location = location self._withoutCaching = withoutCaching @@ -76,7 +76,7 @@ public struct Expression { /// /// @param block The block that can cast the current Expression value to a /// new type. - public func cast(block: (T?) throws -> U?) -> Expression { + public func cast(_ block: @escaping (T?) throws -> U?) -> Expression { return Expression(expression: ({ try block(self.evaluate()) }), location: self.location, isClosure: self.isClosure) } diff --git a/Pods/Nimble/Sources/Nimble/FailureMessage.swift b/Pods/Nimble/Sources/Nimble/FailureMessage.swift index 4d23bc8..2d245e5 100644 --- a/Pods/Nimble/Sources/Nimble/FailureMessage.swift +++ b/Pods/Nimble/Sources/Nimble/FailureMessage.swift @@ -9,6 +9,10 @@ public class FailureMessage: NSObject { public var to: String = "to" public var postfixMessage: String = "match" public var postfixActual: String = "" + /// An optional message that will be appended as a new line and provides additional details + /// about the failure. This message will only be visible in the issue navigator / in logs but + /// not directly in the source editor since only a single line is presented there. + public var extendedMessage: String? = nil public var userDescription: String? = nil public var stringValue: String { @@ -33,11 +37,12 @@ public class FailureMessage: NSObject { _stringValueOverride = stringValue } - internal func stripNewlines(str: String) -> String { - var lines: [String] = NSString(string: str).componentsSeparatedByString("\n") as [String] - let whitespace = NSCharacterSet.whitespaceAndNewlineCharacterSet() - lines = lines.map { line in NSString(string: line).stringByTrimmingCharactersInSet(whitespace) } - return lines.joinWithSeparator("") + internal func stripNewlines(_ str: String) -> String { + let whitespaces = CharacterSet.whitespacesAndNewlines + return str + .components(separatedBy: "\n") + .map { line in line.trimmingCharacters(in: whitespaces) } + .joined(separator: "") } internal func computeStringValue() -> String { @@ -46,11 +51,15 @@ public class FailureMessage: NSObject { value = "\(expected) \(to) \(postfixMessage), got \(actualValue)\(postfixActual)" } value = stripNewlines(value) - + + if let extendedMessage = extendedMessage { + value += "\n\(stripNewlines(extendedMessage))" + } + if let userDescription = userDescription { return "\(userDescription)\n\(value)" } return value } -} \ No newline at end of file +} diff --git a/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift b/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift index d67714b..3a9258d 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift @@ -1,55 +1,63 @@ import Foundation -public func allPass - (passFunc: (T?) -> Bool) -> NonNilMatcherFunc { - return allPass("pass a condition", passFunc) +public func allPass + (_ passFunc: @escaping (T?) -> Bool) -> NonNilMatcherFunc + where U: Sequence, U.Iterator.Element == T +{ + return allPass("pass a condition", passFunc) } -public func allPass - (passName: String, _ passFunc: (T?) -> Bool) -> NonNilMatcherFunc { - return createAllPassMatcher() { - expression, failureMessage in - failureMessage.postfixMessage = passName - return passFunc(try expression.evaluate()) - } +public func allPass + (_ passName: String, _ passFunc: @escaping (T?) -> Bool) -> NonNilMatcherFunc + where U: Sequence, U.Iterator.Element == T +{ + return createAllPassMatcher() { + expression, failureMessage in + failureMessage.postfixMessage = passName + return passFunc(try expression.evaluate()) + } } -public func allPass - (matcher: V) -> NonNilMatcherFunc { - return createAllPassMatcher() { - try matcher.matches($0, failureMessage: $1) - } +public func allPass + (_ matcher: V) -> NonNilMatcherFunc + where U: Sequence, V: Matcher, U.Iterator.Element == V.ValueType +{ + return createAllPassMatcher() { + try matcher.matches($0, failureMessage: $1) + } } -private func createAllPassMatcher - (elementEvaluator:(Expression, FailureMessage) throws -> Bool) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.actualValue = nil - if let actualValue = try actualExpression.evaluate() { - for currentElement in actualValue { - let exp = Expression( - expression: {currentElement}, location: actualExpression.location) - if try !elementEvaluator(exp, failureMessage) { - failureMessage.postfixMessage = - "all \(failureMessage.postfixMessage)," - + " but failed first at element <\(stringify(currentElement))>" - + " in <\(stringify(actualValue))>" - return false - } +private func createAllPassMatcher + (_ elementEvaluator: @escaping (Expression, FailureMessage) throws -> Bool) -> NonNilMatcherFunc + where U: Sequence, U.Iterator.Element == T +{ + return NonNilMatcherFunc { actualExpression, failureMessage in + failureMessage.actualValue = nil + if let actualValue = try actualExpression.evaluate() { + for currentElement in actualValue { + let exp = Expression( + expression: {currentElement}, location: actualExpression.location) + if try !elementEvaluator(exp, failureMessage) { + failureMessage.postfixMessage = + "all \(failureMessage.postfixMessage)," + + " but failed first at element <\(stringify(currentElement))>" + + " in <\(stringify(actualValue))>" + return false } - failureMessage.postfixMessage = "all \(failureMessage.postfixMessage)" - } else { - failureMessage.postfixMessage = "all pass (use beNil() to match nils)" - return false } - - return true + failureMessage.postfixMessage = "all \(failureMessage.postfixMessage)" + } else { + failureMessage.postfixMessage = "all pass (use beNil() to match nils)" + return false } + + return true + } } #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func allPassMatcher(matcher: NMBObjCMatcher) -> NMBObjCMatcher { + public class func allPassMatcher(_ matcher: NMBObjCMatcher) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let location = actualExpression.location let actualValue = try! actualExpression.evaluate() @@ -57,8 +65,8 @@ extension NMBObjCMatcher { var collectionIsUsable = true if let value = actualValue as? NSFastEnumeration { - let generator = NSFastGenerator(value) - while let obj:AnyObject = generator.next() { + let generator = NSFastEnumerationIterator(value) + while let obj = generator.next() { if let nsObject = obj as? NSObject { nsObjects.append(nsObject) } else { diff --git a/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift b/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift index 3df6eb6..6b89c76 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift @@ -1,24 +1,26 @@ import Foundation -#if _runtime(_ObjC) - +/// If you are running on a slower machine, it could be useful to increase the default timeout value +/// or slow down poll interval. Default timeout interval is 1, and poll interval is 0.01. public struct AsyncDefaults { - public static var Timeout: NSTimeInterval = 1 - public static var PollInterval: NSTimeInterval = 0.01 + public static var Timeout: TimeInterval = 1 + public static var PollInterval: TimeInterval = 0.01 } -internal struct AsyncMatcherWrapper: Matcher { +internal struct AsyncMatcherWrapper: Matcher + where U: Matcher, U.ValueType == T +{ let fullMatcher: U - let timeoutInterval: NSTimeInterval - let pollInterval: NSTimeInterval + let timeoutInterval: TimeInterval + let pollInterval: TimeInterval - init(fullMatcher: U, timeoutInterval: NSTimeInterval = AsyncDefaults.Timeout, pollInterval: NSTimeInterval = AsyncDefaults.PollInterval) { + init(fullMatcher: U, timeoutInterval: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval) { self.fullMatcher = fullMatcher self.timeoutInterval = timeoutInterval self.pollInterval = pollInterval } - func matches(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + func matches(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { let uncachedExpression = actualExpression.withoutCaching() let fnName = "expect(...).toEventually(...)" let result = pollBlock( @@ -30,23 +32,23 @@ internal struct AsyncMatcherWrapper: Ma try self.fullMatcher.matches(uncachedExpression, failureMessage: failureMessage) } switch (result) { - case let .Completed(isSuccessful): return isSuccessful - case .TimedOut: return false - case let .ErrorThrown(error): + case let .completed(isSuccessful): return isSuccessful + case .timedOut: return false + case let .errorThrown(error): failureMessage.actualValue = "an unexpected error thrown: <\(error)>" return false - case let .RaisedException(exception): + case let .raisedException(exception): failureMessage.actualValue = "an unexpected exception thrown: <\(exception)>" return false - case .BlockedRunLoop: + case .blockedRunLoop: failureMessage.postfixMessage += " (timed out, but main thread was unresponsive)." return false - case .Incomplete: - internalError("Reached .Incomplete state for toEventually(...).") + case .incomplete: + internalError("Reached .incomplete state for toEventually(...).") } } - func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { let uncachedExpression = actualExpression.withoutCaching() let result = pollBlock( pollInterval: pollInterval, @@ -57,19 +59,19 @@ internal struct AsyncMatcherWrapper: Ma try self.fullMatcher.doesNotMatch(uncachedExpression, failureMessage: failureMessage) } switch (result) { - case let .Completed(isSuccessful): return isSuccessful - case .TimedOut: return false - case let .ErrorThrown(error): + case let .completed(isSuccessful): return isSuccessful + case .timedOut: return false + case let .errorThrown(error): failureMessage.actualValue = "an unexpected error thrown: <\(error)>" return false - case let .RaisedException(exception): + case let .raisedException(exception): failureMessage.actualValue = "an unexpected exception thrown: <\(exception)>" return false - case .BlockedRunLoop: + case .blockedRunLoop: failureMessage.postfixMessage += " (timed out, but main thread was unresponsive)." return false - case .Incomplete: - internalError("Reached .Incomplete state for toEventuallyNot(...).") + case .incomplete: + internalError("Reached .incomplete state for toEventuallyNot(...).") } } } @@ -84,7 +86,9 @@ extension Expectation { /// @discussion /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toEventually(matcher: U, timeout: NSTimeInterval = AsyncDefaults.Timeout, pollInterval: NSTimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { + public func toEventually(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) + where U: Matcher, U.ValueType == T + { if expression.isClosure { let (pass, msg) = expressionMatches( expression, @@ -107,7 +111,9 @@ extension Expectation { /// @discussion /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toEventuallyNot(matcher: U, timeout: NSTimeInterval = AsyncDefaults.Timeout, pollInterval: NSTimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { + public func toEventuallyNot(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) + where U: Matcher, U.ValueType == T + { if expression.isClosure { let (pass, msg) = expressionDoesNotMatch( expression, @@ -132,9 +138,9 @@ extension Expectation { /// @discussion /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toNotEventually(matcher: U, timeout: NSTimeInterval = AsyncDefaults.Timeout, pollInterval: NSTimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { + public func toNotEventually(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) + where U: Matcher, U.ValueType == T + { return toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) } } - -#endif diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift index d1f3737..99b8f8f 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift @@ -3,7 +3,7 @@ import Foundation #if _runtime(_ObjC) // A Nimble matcher that catches attempts to use beAKindOf with non Objective-C types -public func beAKindOf(expectedClass: Any) -> NonNilMatcherFunc { +public func beAKindOf(_ expectedClass: Any) -> NonNilMatcherFunc { return NonNilMatcherFunc {actualExpression, failureMessage in failureMessage.stringValue = "beAKindOf only works on Objective-C types since" + " the Swift compiler will automatically type check Swift-only types." @@ -14,21 +14,21 @@ public func beAKindOf(expectedClass: Any) -> NonNilMatcherFunc { /// A Nimble matcher that succeeds when the actual value is an instance of the given class. /// @see beAnInstanceOf if you want to match against the exact class -public func beAKindOf(expectedClass: AnyClass) -> NonNilMatcherFunc { +public func beAKindOf(_ expectedClass: AnyClass) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in let instance = try actualExpression.evaluate() if let validInstance = instance { - failureMessage.actualValue = "<\(classAsString(validInstance.dynamicType)) instance>" + failureMessage.actualValue = "<\(String(describing: type(of: validInstance))) instance>" } else { failureMessage.actualValue = "" } - failureMessage.postfixMessage = "be a kind of \(classAsString(expectedClass))" - return instance != nil && instance!.isKindOfClass(expectedClass) + failureMessage.postfixMessage = "be a kind of \(String(describing: expectedClass))" + return instance != nil && instance!.isKind(of: expectedClass) } } extension NMBObjCMatcher { - public class func beAKindOfMatcher(expected: AnyClass) -> NMBMatcher { + public class func beAKindOfMatcher(_ expected: AnyClass) -> NMBMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in return try! beAKindOf(expected).matches(actualExpression, failureMessage: failureMessage) } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift index 32477dd..2298c78 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift @@ -1,7 +1,7 @@ import Foundation // A Nimble matcher that catches attempts to use beAnInstanceOf with non Objective-C types -public func beAnInstanceOf(expectedClass: Any) -> NonNilMatcherFunc { +public func beAnInstanceOf(_ expectedClass: Any) -> NonNilMatcherFunc { return NonNilMatcherFunc {actualExpression, failureMessage in failureMessage.stringValue = "beAnInstanceOf only works on Objective-C types since" + " the Swift compiler will automatically type check Swift-only types." @@ -12,26 +12,26 @@ public func beAnInstanceOf(expectedClass: Any) -> NonNilMatcherFunc { /// A Nimble matcher that succeeds when the actual value is an instance of the given class. /// @see beAKindOf if you want to match against subclasses -public func beAnInstanceOf(expectedClass: AnyClass) -> NonNilMatcherFunc { +public func beAnInstanceOf(_ expectedClass: AnyClass) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in let instance = try actualExpression.evaluate() if let validInstance = instance { - failureMessage.actualValue = "<\(classAsString(validInstance.dynamicType)) instance>" + failureMessage.actualValue = "<\(String(describing: type(of: validInstance))) instance>" } else { failureMessage.actualValue = "" } - failureMessage.postfixMessage = "be an instance of \(classAsString(expectedClass))" + failureMessage.postfixMessage = "be an instance of \(String(describing: expectedClass))" #if _runtime(_ObjC) - return instance != nil && instance!.isMemberOfClass(expectedClass) + return instance != nil && instance!.isMember(of: expectedClass) #else - return instance != nil && instance!.dynamicType == expectedClass + return instance != nil && type(of: instance!) == expectedClass #endif } } #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func beAnInstanceOfMatcher(expected: AnyClass) -> NMBMatcher { + public class func beAnInstanceOfMatcher(_ expected: AnyClass) -> NMBMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in return try! beAnInstanceOf(expected).matches(actualExpression, failureMessage: failureMessage) } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift index 2ba9d2f..48e9895 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift @@ -1,11 +1,8 @@ -#if os(Linux) -import Glibc -#endif import Foundation internal let DefaultDelta = 0.0001 -internal func isCloseTo(actualValue: NMBDoubleConvertible?, expectedValue: NMBDoubleConvertible, delta: Double, failureMessage: FailureMessage) -> Bool { +internal func isCloseTo(_ actualValue: NMBDoubleConvertible?, expectedValue: NMBDoubleConvertible, delta: Double, failureMessage: FailureMessage) -> Bool { failureMessage.postfixMessage = "be close to <\(stringify(expectedValue))> (within \(stringify(delta)))" failureMessage.actualValue = "<\(stringify(actualValue))>" return actualValue != nil && abs(actualValue!.doubleValue - expectedValue.doubleValue) < delta @@ -15,7 +12,7 @@ internal func isCloseTo(actualValue: NMBDoubleConvertible?, expectedValue: NMBDo /// point values which can have imprecise results when doing arithmetic on them. /// /// @see equal -public func beCloseTo(expectedValue: Double, within delta: Double = DefaultDelta) -> NonNilMatcherFunc { +public func beCloseTo(_ expectedValue: Double, within delta: Double = DefaultDelta) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta, failureMessage: failureMessage) } @@ -25,7 +22,7 @@ public func beCloseTo(expectedValue: Double, within delta: Double = DefaultDelta /// point values which can have imprecise results when doing arithmetic on them. /// /// @see equal -public func beCloseTo(expectedValue: NMBDoubleConvertible, within delta: Double = DefaultDelta) -> NonNilMatcherFunc { +public func beCloseTo(_ expectedValue: NMBDoubleConvertible, within delta: Double = DefaultDelta) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta, failureMessage: failureMessage) } @@ -40,7 +37,7 @@ public class NMBObjCBeCloseToMatcher : NSObject, NMBMatcher { _delta = within } - public func matches(actualExpression: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + public func matches(_ actualExpression: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { let actualBlock: () -> NMBDoubleConvertible? = ({ return actualExpression() as? NMBDoubleConvertible }) @@ -49,7 +46,7 @@ public class NMBObjCBeCloseToMatcher : NSObject, NMBMatcher { return try! matcher.matches(expr, failureMessage: failureMessage) } - public func doesNotMatch(actualExpression: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + public func doesNotMatch(_ actualExpression: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { let actualBlock: () -> NMBDoubleConvertible? = ({ return actualExpression() as? NMBDoubleConvertible }) @@ -66,13 +63,13 @@ public class NMBObjCBeCloseToMatcher : NSObject, NMBMatcher { } extension NMBObjCMatcher { - public class func beCloseToMatcher(expected: NSNumber, within: CDouble) -> NMBObjCBeCloseToMatcher { + public class func beCloseToMatcher(_ expected: NSNumber, within: CDouble) -> NMBObjCBeCloseToMatcher { return NMBObjCBeCloseToMatcher(expected: expected, within: within) } } #endif -public func beCloseTo(expectedValues: [Double], within delta: Double = DefaultDelta) -> NonNilMatcherFunc <[Double]> { +public func beCloseTo(_ expectedValues: [Double], within delta: Double = DefaultDelta) -> NonNilMatcherFunc <[Double]> { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be close to <\(stringify(expectedValues))> (each within \(stringify(delta)))" if let actual = try actualExpression.evaluate() { @@ -81,7 +78,7 @@ public func beCloseTo(expectedValues: [Double], within delta: Double = DefaultDe if actual.count != expectedValues.count { return false } else { - for (index, actualItem) in actual.enumerate() { + for (index, actualItem) in actual.enumerated() { if fabs(actualItem - expectedValues[index]) > delta { return false } @@ -95,10 +92,7 @@ public func beCloseTo(expectedValues: [Double], within delta: Double = DefaultDe // MARK: - Operators -infix operator ≈ { - associativity none - precedence 130 -} +infix operator ≈ : ComparisonPrecedence public func ≈(lhs: Expectation<[Double]>, rhs: [Double]) { lhs.to(beCloseTo(rhs)) @@ -118,7 +112,11 @@ public func ==(lhs: Expectation, rhs: (expected: NMBDouble // make this higher precedence than exponents so the Doubles either end aren't pulled in // unexpectantly -infix operator ± { precedence 170 } +precedencegroup PlusMinusOperatorPrecedence { + higherThan: BitwiseShiftPrecedence +} + +infix operator ± : PlusMinusOperatorPrecedence public func ±(lhs: NMBDoubleConvertible, rhs: Double) -> (expected: NMBDoubleConvertible, delta: Double) { return (expected: lhs, delta: rhs) } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift index cebd82d..19df0d2 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift @@ -3,14 +3,14 @@ import Foundation /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> NonNilMatcherFunc { +public func beEmpty() -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be empty" let actualSeq = try actualExpression.evaluate() if actualSeq == nil { return true } - var generator = actualSeq!.generate() + var generator = actualSeq!.makeIterator() return generator.next() == nil } } @@ -36,7 +36,7 @@ public func beEmpty() -> NonNilMatcherFunc { } // Without specific overrides, beEmpty() is ambiguous for NSDictionary, NSArray, -// etc, since they conform to SequenceType as well as NMBCollection. +// etc, since they conform to Sequence as well as NMBCollection. /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. @@ -83,7 +83,7 @@ extension NMBObjCMatcher { return try! beEmpty().matches(expr, failureMessage: failureMessage) } else if let actualValue = actualValue { failureMessage.postfixMessage = "be empty (only works for NSArrays, NSSets, NSIndexSets, NSDictionaries, NSHashTables, and NSStrings)" - failureMessage.actualValue = "\(classAsString(actualValue.dynamicType)) type" + failureMessage.actualValue = "\(String(describing: type(of: actualValue))) type" } return false } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift index 0f24ab5..1345199 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift @@ -2,19 +2,22 @@ import Foundation /// A Nimble matcher that succeeds when the actual value is greater than the expected value. -public func beGreaterThan(expectedValue: T?) -> NonNilMatcherFunc { +public func beGreaterThan(_ expectedValue: T?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" - return try actualExpression.evaluate() > expectedValue + if let actual = try actualExpression.evaluate(), let expected = expectedValue { + return actual > expected + } + return false } } /// A Nimble matcher that succeeds when the actual value is greater than the expected value. -public func beGreaterThan(expectedValue: NMBComparable?) -> NonNilMatcherFunc { +public func beGreaterThan(_ expectedValue: NMBComparable?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" let actualValue = try actualExpression.evaluate() - let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == NSComparisonResult.OrderedDescending + let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedDescending return matches } } @@ -29,7 +32,7 @@ public func >(lhs: Expectation, rhs: NMBComparable?) { #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func beGreaterThanMatcher(expected: NMBComparable?) -> NMBObjCMatcher { + public class func beGreaterThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let expr = actualExpression.cast { $0 as? NMBComparable } return try! beGreaterThan(expected).matches(expr, failureMessage: failureMessage) diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift index c89ff07..2949fce 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift @@ -2,21 +2,24 @@ import Foundation /// A Nimble matcher that succeeds when the actual value is greater than /// or equal to the expected value. -public func beGreaterThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { +public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be greater than or equal to <\(stringify(expectedValue))>" let actualValue = try actualExpression.evaluate() - return actualValue >= expectedValue + if let actual = actualValue, let expected = expectedValue { + return actual >= expected + } + return false } } /// A Nimble matcher that succeeds when the actual value is greater than /// or equal to the expected value. -public func beGreaterThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { +public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be greater than or equal to <\(stringify(expectedValue))>" let actualValue = try actualExpression.evaluate() - let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) != NSComparisonResult.OrderedAscending + let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) != ComparisonResult.orderedAscending return matches } } @@ -31,7 +34,7 @@ public func >=(lhs: Expectation, rhs: T) { #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func beGreaterThanOrEqualToMatcher(expected: NMBComparable?) -> NMBObjCMatcher { + public class func beGreaterThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let expr = actualExpression.cast { $0 as? NMBComparable } return try! beGreaterThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift index a369501..ca3357b 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift @@ -3,19 +3,27 @@ import Foundation /// A Nimble matcher that succeeds when the actual value is the same instance /// as the expected instance. -public func beIdenticalTo(expected: AnyObject?) -> NonNilMatcherFunc { +public func beIdenticalTo(_ expected: Any?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in - let actual = try actualExpression.evaluate() + #if os(Linux) + let actual = try actualExpression.evaluate() as? AnyObject + #else + let actual = try actualExpression.evaluate() as AnyObject? + #endif failureMessage.actualValue = "\(identityAsString(actual))" failureMessage.postfixMessage = "be identical to \(identityAsString(expected))" - return actual === expected && actual !== nil + #if os(Linux) + return actual === (expected as? AnyObject) && actual !== nil + #else + return actual === (expected as AnyObject?) && actual !== nil + #endif } } -public func ===(lhs: Expectation, rhs: AnyObject?) { +public func ===(lhs: Expectation, rhs: Any?) { lhs.to(beIdenticalTo(rhs)) } -public func !==(lhs: Expectation, rhs: AnyObject?) { +public func !==(lhs: Expectation, rhs: Any?) { lhs.toNot(beIdenticalTo(rhs)) } @@ -23,15 +31,15 @@ public func !==(lhs: Expectation, rhs: AnyObject?) { /// as the expected instance. /// /// Alias for "beIdenticalTo". -public func be(expected: AnyObject?) -> NonNilMatcherFunc { +public func be(_ expected: Any?) -> NonNilMatcherFunc { return beIdenticalTo(expected) } #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func beIdenticalToMatcher(expected: NSObject?) -> NMBObjCMatcher { + public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let aExpr = actualExpression.cast { $0 as AnyObject? } + let aExpr = actualExpression.cast { $0 as Any? } return try! beIdenticalTo(expected).matches(aExpr, failureMessage: failureMessage) } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift index ea4725b..fbcd7c7 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift @@ -1,19 +1,22 @@ import Foundation /// A Nimble matcher that succeeds when the actual value is less than the expected value. -public func beLessThan(expectedValue: T?) -> NonNilMatcherFunc { +public func beLessThan(_ expectedValue: T?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" - return try actualExpression.evaluate() < expectedValue + if let actual = try actualExpression.evaluate(), let expected = expectedValue { + return actual < expected + } + return false } } /// A Nimble matcher that succeeds when the actual value is less than the expected value. -public func beLessThan(expectedValue: NMBComparable?) -> NonNilMatcherFunc { +public func beLessThan(_ expectedValue: NMBComparable?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" let actualValue = try actualExpression.evaluate() - let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == NSComparisonResult.OrderedAscending + let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedAscending return matches } } @@ -28,9 +31,9 @@ public func <(lhs: Expectation, rhs: NMBComparable?) { #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func beLessThanMatcher(expected: NMBComparable?) -> NMBObjCMatcher { + public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let expr = actualExpression.cast { $0 as! NMBComparable? } + let expr = actualExpression.cast { $0 as? NMBComparable } return try! beLessThan(expected).matches(expr, failureMessage: failureMessage) } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift index a24cf8c..a0cd2f0 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift @@ -2,20 +2,23 @@ import Foundation /// A Nimble matcher that succeeds when the actual value is less than /// or equal to the expected value. -public func beLessThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { +public func beLessThanOrEqualTo(_ expectedValue: T?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" - return try actualExpression.evaluate() <= expectedValue + if let actual = try actualExpression.evaluate(), let expected = expectedValue { + return actual <= expected + } + return false } } /// A Nimble matcher that succeeds when the actual value is less than /// or equal to the expected value. -public func beLessThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { +public func beLessThanOrEqualTo(_ expectedValue: T?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" let actualValue = try actualExpression.evaluate() - return actualValue != nil && actualValue!.NMB_compare(expectedValue) != NSComparisonResult.OrderedDescending + return actualValue != nil && actualValue!.NMB_compare(expectedValue) != ComparisonResult.orderedDescending } } @@ -29,7 +32,7 @@ public func <=(lhs: Expectation, rhs: T) { #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func beLessThanOrEqualToMatcher(expected: NMBComparable?) -> NMBObjCMatcher { + public class func beLessThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil:false) { actualExpression, failureMessage in let expr = actualExpression.cast { $0 as? NMBComparable } return try! beLessThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift index ac729b2..49272a3 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift @@ -1,6 +1,78 @@ import Foundation -internal func matcherWithFailureMessage(matcher: NonNilMatcherFunc, postprocessor: (FailureMessage) -> Void) -> NonNilMatcherFunc { +extension Int8: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).int8Value + } +} + +extension UInt8: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).uint8Value + } +} + +extension Int16: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).int16Value + } +} + +extension UInt16: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).uint16Value + } +} + +extension Int32: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).int32Value + } +} + +extension UInt32: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).uint32Value + } +} + +extension Int64: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).int64Value + } +} + +extension UInt64: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).uint64Value + } +} + +extension Float: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).floatValue + } +} + +extension Double: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).doubleValue + } +} + +extension Int: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).intValue + } +} + +extension UInt: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).uintValue + } +} + +internal func matcherWithFailureMessage(_ matcher: NonNilMatcherFunc, postprocessor: @escaping (FailureMessage) -> Void) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in defer { postprocessor(failureMessage) } return try matcher.matcher(actualExpression, failureMessage) @@ -28,14 +100,20 @@ public func beFalse() -> NonNilMatcherFunc { // MARK: beTruthy() / beFalsy() /// A Nimble matcher that succeeds when the actual value is not logically false. -public func beTruthy() -> MatcherFunc { +public func beTruthy() -> MatcherFunc { return MatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be truthy" let actualValue = try actualExpression.evaluate() if let actualValue = actualValue { - if let actualValue = actualValue as? BooleanType { - return actualValue.boolValue == true + // FIXME: This is a workaround to SR-2290. + // See: + // - https://bugs.swift.org/browse/SR-2290 + // - https://github.com/norio-nomura/Nimble/pull/5#issuecomment-237835873 + if let number = actualValue as? NSNumber { + return number.boolValue == true } + + return actualValue == (true as T) } return actualValue != nil } @@ -43,14 +121,20 @@ public func beTruthy() -> MatcherFunc { /// A Nimble matcher that succeeds when the actual value is logically false. /// This matcher will match against nils. -public func beFalsy() -> MatcherFunc { +public func beFalsy() -> MatcherFunc { return MatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be falsy" let actualValue = try actualExpression.evaluate() if let actualValue = actualValue { - if let actualValue = actualValue as? BooleanType { - return actualValue.boolValue != true + // FIXME: This is a workaround to SR-2290. + // See: + // - https://bugs.swift.org/browse/SR-2290 + // - https://github.com/norio-nomura/Nimble/pull/5#issuecomment-237835873 + if let number = actualValue as? NSNumber { + return number.boolValue == false } + + return actualValue == (false as T) } return actualValue == nil } @@ -60,28 +144,28 @@ public func beFalsy() -> MatcherFunc { extension NMBObjCMatcher { public class func beTruthyMatcher() -> NMBObjCMatcher { return NMBObjCMatcher { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false as BooleanType? } + let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } return try! beTruthy().matches(expr, failureMessage: failureMessage) } } public class func beFalsyMatcher() -> NMBObjCMatcher { return NMBObjCMatcher { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false as BooleanType? } + let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } return try! beFalsy().matches(expr, failureMessage: failureMessage) } } public class func beTrueMatcher() -> NMBObjCMatcher { return NMBObjCMatcher { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false as Bool? } + let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } return try! beTrue().matches(expr, failureMessage: failureMessage) } } public class func beFalseMatcher() -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false as Bool? } + let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } return try! beFalse().matches(expr, failureMessage: failureMessage) } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift index 0b5e0e1..ef6c603 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift @@ -3,11 +3,13 @@ import Foundation /// A Nimble matcher that succeeds when the actual sequence's first element /// is equal to the expected value. -public func beginWith(startingElement: T) -> NonNilMatcherFunc { +public func beginWith(_ startingElement: T) -> NonNilMatcherFunc + where S.Iterator.Element == T +{ return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "begin with <\(startingElement)>" if let actualValue = try actualExpression.evaluate() { - var actualGenerator = actualValue.generate() + var actualGenerator = actualValue.makeIterator() return actualGenerator.next() == startingElement } return false @@ -16,22 +18,30 @@ public func beginWith NonNilMatcherFunc { +public func beginWith(_ startingElement: Any) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "begin with <\(startingElement)>" - let collection = try actualExpression.evaluate() - return collection != nil && collection!.indexOfObject(startingElement) == 0 + guard let collection = try actualExpression.evaluate() else { return false } + guard collection.count > 0 else { return false } + #if os(Linux) + guard let collectionValue = collection.object(at: 0) as? NSObject else { + return false + } + #else + let collectionValue = collection.object(at: 0) as AnyObject + #endif + return collectionValue.isEqual(startingElement) } } /// A Nimble matcher that succeeds when the actual string contains expected substring /// where the expected substring's location is zero. -public func beginWith(startingSubstring: String) -> NonNilMatcherFunc { +public func beginWith(_ startingSubstring: String) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "begin with <\(startingSubstring)>" if let actual = try actualExpression.evaluate() { - let range = actual.rangeOfString(startingSubstring) - return range != nil && range!.startIndex == actual.startIndex + let range = actual.range(of: startingSubstring) + return range != nil && range!.lowerBound == actual.startIndex } return false } @@ -39,7 +49,7 @@ public func beginWith(startingSubstring: String) -> NonNilMatcherFunc { #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func beginWithMatcher(expected: AnyObject) -> NMBObjCMatcher { + public class func beginWithMatcher(_ expected: Any) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let actual = try! actualExpression.evaluate() if let _ = actual as? String { diff --git a/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift b/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift index cc08768..4400d30 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift @@ -1,11 +1,15 @@ import Foundation /// A Nimble matcher that succeeds when the actual sequence contains the expected value. -public func contain(items: T...) -> NonNilMatcherFunc { +public func contain(_ items: T...) -> NonNilMatcherFunc + where S.Iterator.Element == T +{ return contain(items) } -public func contain(items: [T]) -> NonNilMatcherFunc { +public func contain(_ items: [T]) -> NonNilMatcherFunc + where S.Iterator.Element == T +{ return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "contain <\(arrayAsString(items))>" if let actual = try actualExpression.evaluate() { @@ -18,16 +22,16 @@ public func contain NonNilMatcherFunc { +public func contain(_ substrings: String...) -> NonNilMatcherFunc { return contain(substrings) } -public func contain(substrings: [String]) -> NonNilMatcherFunc { +public func contain(_ substrings: [String]) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "contain <\(arrayAsString(substrings))>" if let actual = try actualExpression.evaluate() { return substrings.all { - let range = actual.rangeOfString($0) + let range = actual.range(of: $0) return range != nil && !range!.isEmpty } } @@ -36,38 +40,38 @@ public func contain(substrings: [String]) -> NonNilMatcherFunc { } /// A Nimble matcher that succeeds when the actual string contains the expected substring. -public func contain(substrings: NSString...) -> NonNilMatcherFunc { +public func contain(_ substrings: NSString...) -> NonNilMatcherFunc { return contain(substrings) } -public func contain(substrings: [NSString]) -> NonNilMatcherFunc { +public func contain(_ substrings: [NSString]) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "contain <\(arrayAsString(substrings))>" if let actual = try actualExpression.evaluate() { - return substrings.all { actual.rangeOfString($0.description).length != 0 } + return substrings.all { actual.range(of: $0.description).length != 0 } } return false } } /// A Nimble matcher that succeeds when the actual collection contains the expected object. -public func contain(items: AnyObject?...) -> NonNilMatcherFunc { +public func contain(_ items: Any?...) -> NonNilMatcherFunc { return contain(items) } -public func contain(items: [AnyObject?]) -> NonNilMatcherFunc { +public func contain(_ items: [Any?]) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "contain <\(arrayAsString(items))>" guard let actual = try actualExpression.evaluate() else { return false } return items.all { item in - return item != nil && actual.containsObject(item!) + return item != nil && actual.contains(item!) } } } #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func containMatcher(expected: [NSObject]) -> NMBObjCMatcher { + public class func containMatcher(_ expected: [NSObject]) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let location = actualExpression.location let actualValue = try! actualExpression.evaluate() @@ -75,7 +79,7 @@ extension NMBObjCMatcher { let expr = Expression(expression: ({ value as NMBContainer }), location: location) // A straightforward cast on the array causes this to crash, so we have to cast the individual items - let expectedOptionals: [AnyObject?] = expected.map({ $0 as AnyObject? }) + let expectedOptionals: [Any?] = expected.map({ $0 as Any? }) return try! contain(expectedOptionals).matches(expr, failureMessage: failureMessage) } else if let value = actualValue as? NSString { let expr = Expression(expression: ({ value as String }), location: location) diff --git a/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift b/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift index ff2bd9e..b96e96c 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift @@ -3,12 +3,14 @@ import Foundation /// A Nimble matcher that succeeds when the actual sequence's last element /// is equal to the expected value. -public func endWith(endingElement: T) -> NonNilMatcherFunc { +public func endWith(_ endingElement: T) -> NonNilMatcherFunc + where S.Iterator.Element == T +{ return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "end with <\(endingElement)>" if let actualValue = try actualExpression.evaluate() { - var actualGenerator = actualValue.generate() + var actualGenerator = actualValue.makeIterator() var lastItem: T? var item: T? repeat { @@ -24,11 +26,20 @@ public func endWith NonNilMatcherFunc { +public func endWith(_ endingElement: Any) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "end with <\(endingElement)>" - let collection = try actualExpression.evaluate() - return collection != nil && collection!.indexOfObject(endingElement) == collection!.count - 1 + guard let collection = try actualExpression.evaluate() else { return false } + guard collection.count > 0 else { return false } + #if os(Linux) + guard let collectionValue = collection.object(at: collection.count - 1) as? NSObject else { + return false + } + #else + let collectionValue = collection.object(at: collection.count - 1) as AnyObject + #endif + + return collectionValue.isEqual(endingElement) } } @@ -36,12 +47,11 @@ public func endWith(endingElement: AnyObject) -> NonNilMatcherFunc NonNilMatcherFunc { +public func endWith(_ endingSubstring: String) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "end with <\(endingSubstring)>" if let collection = try actualExpression.evaluate() { - let range = collection.rangeOfString(endingSubstring) - return range != nil && range!.endIndex == collection.endIndex + return collection.hasSuffix(endingSubstring) } return false } @@ -49,7 +59,7 @@ public func endWith(endingSubstring: String) -> NonNilMatcherFunc { #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func endWithMatcher(expected: AnyObject) -> NMBObjCMatcher { + public class func endWithMatcher(_ expected: Any) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let actual = try! actualExpression.evaluate() if let _ = actual as? String { diff --git a/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift b/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift index 6373d8c..53579e0 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift @@ -4,7 +4,7 @@ import Foundation /// Values can support equal by supporting the Equatable protocol. /// /// @see beCloseTo if you want to match imprecise types (eg - floats, doubles). -public func equal(expectedValue: T?) -> NonNilMatcherFunc { +public func equal(_ expectedValue: T?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" let actualValue = try actualExpression.evaluate() @@ -23,7 +23,7 @@ public func equal(expectedValue: T?) -> NonNilMatcherFunc { /// Values can support equal by supporting the Equatable protocol. /// /// @see beCloseTo if you want to match imprecise types (eg - floats, doubles). -public func equal(expectedValue: [T: C]?) -> NonNilMatcherFunc<[T: C]> { +public func equal(_ expectedValue: [T: C]?) -> NonNilMatcherFunc<[T: C]> { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" let actualValue = try actualExpression.evaluate() @@ -39,7 +39,7 @@ public func equal(expectedValue: [T: C]?) -> NonNilM /// A Nimble matcher that succeeds when the actual collection is equal to the expected collection. /// Items must implement the Equatable protocol. -public func equal(expectedValue: [T]?) -> NonNilMatcherFunc<[T]> { +public func equal(_ expectedValue: [T]?) -> NonNilMatcherFunc<[T]> { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" let actualValue = try actualExpression.evaluate() @@ -54,7 +54,7 @@ public func equal(expectedValue: [T]?) -> NonNilMatcherFunc<[T]> { } /// A Nimble matcher allowing comparison of collection with optional type -public func equal(expectedValue: [T?]) -> NonNilMatcherFunc<[T?]> { +public func equal(_ expectedValue: [T?]) -> NonNilMatcherFunc<[T?]> { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" if let actualValue = try actualExpression.evaluate() { @@ -62,7 +62,7 @@ public func equal(expectedValue: [T?]) -> NonNilMatcherFunc<[T?]> return false } - for (index, item) in actualValue.enumerate() { + for (index, item) in actualValue.enumerated() { let otherItem = expectedValue[index] if item == nil && otherItem == nil { continue @@ -85,22 +85,22 @@ public func equal(expectedValue: [T?]) -> NonNilMatcherFunc<[T?]> } /// A Nimble matcher that succeeds when the actual set is equal to the expected set. -public func equal(expectedValue: Set?) -> NonNilMatcherFunc> { - return equal(expectedValue, stringify: stringify) +public func equal(_ expectedValue: Set?) -> NonNilMatcherFunc> { + return equal(expectedValue, stringify: { stringify($0) }) } /// A Nimble matcher that succeeds when the actual set is equal to the expected set. -public func equal(expectedValue: Set?) -> NonNilMatcherFunc> { +public func equal(_ expectedValue: Set?) -> NonNilMatcherFunc> { return equal(expectedValue, stringify: { if let set = $0 { - return stringify(Array(set).sort { $0 < $1 }) + return stringify(Array(set).sorted { $0 < $1 }) } else { return "nil" } }) } -private func equal(expectedValue: Set?, stringify: Set? -> String) -> NonNilMatcherFunc> { +private func equal(_ expectedValue: Set?, stringify: @escaping (Set?) -> String) -> NonNilMatcherFunc> { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" @@ -112,12 +112,12 @@ private func equal(expectedValue: Set?, stringify: Set? -> String) -> N return true } - let missing = expectedValue.subtract(actualValue) + let missing = expectedValue.subtracting(actualValue) if missing.count > 0 { failureMessage.postfixActual += ", missing <\(stringify(missing))>" } - let extra = actualValue.subtract(expectedValue) + let extra = actualValue.subtracting(expectedValue) if extra.count > 0 { failureMessage.postfixActual += ", extra <\(stringify(extra))>" } @@ -172,7 +172,7 @@ public func !=(lhs: Expectation<[T: C]>, rhs: [T: C] #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func equalMatcher(expected: NSObject) -> NMBMatcher { + public class func equalMatcher(_ expected: NSObject) -> NMBMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in return try! equal(expected).matches(actualExpression, failureMessage: failureMessage) } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift b/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift index a17cca2..5b24af2 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift @@ -1,13 +1,19 @@ import Foundation -/// A Nimble matcher that succeeds when the actual CollectionType's count equals +// The `haveCount` matchers do not print the full string representation of the collection value, +// instead they only print the type name and the expected count. This makes it easier to understand +// the reason for failed expectations. See: https://github.com/Quick/Nimble/issues/308. +// The representation of the collection content is provided in a new line as an `extendedMessage`. + +/// A Nimble matcher that succeeds when the actual Collection's count equals /// the expected value -public func haveCount(expectedValue: T.Index.Distance) -> NonNilMatcherFunc { +public func haveCount(_ expectedValue: T.IndexDistance) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in if let actualValue = try actualExpression.evaluate() { - failureMessage.postfixMessage = "have \(stringify(actualValue)) with count \(stringify(expectedValue))" + failureMessage.postfixMessage = "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))" let result = expectedValue == actualValue.count failureMessage.actualValue = "\(actualValue.count)" + failureMessage.extendedMessage = "Actual Value: \(stringify(actualValue))" return result } else { return false @@ -17,12 +23,13 @@ public func haveCount(expectedValue: T.Index.Distance) -> Non /// A Nimble matcher that succeeds when the actual collection's count equals /// the expected value -public func haveCount(expectedValue: Int) -> MatcherFunc { +public func haveCount(_ expectedValue: Int) -> MatcherFunc { return MatcherFunc { actualExpression, failureMessage in if let actualValue = try actualExpression.evaluate() { - failureMessage.postfixMessage = "have \(stringify(actualValue)) with count \(stringify(expectedValue))" + failureMessage.postfixMessage = "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))" let result = expectedValue == actualValue.count failureMessage.actualValue = "\(actualValue.count)" + failureMessage.extendedMessage = "Actual Value: \(stringify(actualValue))" return result } else { return false @@ -32,16 +39,16 @@ public func haveCount(expectedValue: Int) -> MatcherFunc { #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func haveCountMatcher(expected: NSNumber) -> NMBObjCMatcher { + public class func haveCountMatcher(_ expected: NSNumber) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let location = actualExpression.location let actualValue = try! actualExpression.evaluate() if let value = actualValue as? NMBCollection { let expr = Expression(expression: ({ value as NMBCollection}), location: location) - return try! haveCount(expected.integerValue).matches(expr, failureMessage: failureMessage) + return try! haveCount(expected.intValue).matches(expr, failureMessage: failureMessage) } else if let actualValue = actualValue { failureMessage.postfixMessage = "get type of NSArray, NSSet, NSDictionary, or NSHashTable" - failureMessage.actualValue = "\(classAsString(actualValue.dynamicType))" + failureMessage.actualValue = "\(String(describing: type(of: actualValue)))" } return false } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/Match.swift b/Pods/Nimble/Sources/Nimble/Matchers/Match.swift index 586e616..3ad5fb5 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/Match.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/Match.swift @@ -1,16 +1,14 @@ import Foundation -#if _runtime(_ObjC) - /// A Nimble matcher that succeeds when the actual string satisfies the regular expression /// described by the expected string. -public func match(expectedValue: String?) -> NonNilMatcherFunc { +public func match(_ expectedValue: String?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "match <\(stringify(expectedValue))>" if let actual = try actualExpression.evaluate() { if let regexp = expectedValue { - return actual.rangeOfString(regexp, options: .RegularExpressionSearch) != nil + return actual.range(of: regexp, options: .regularExpression) != nil } } @@ -18,8 +16,10 @@ public func match(expectedValue: String?) -> NonNilMatcherFunc { } } +#if _runtime(_ObjC) + extension NMBObjCMatcher { - public class func matchMatcher(expected: NSString) -> NMBMatcher { + public class func matchMatcher(_ expected: NSString) -> NMBMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let actual = actualExpression.cast { $0 as? String } return try! match(expected.description).matches(actual, failureMessage: failureMessage) diff --git a/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift b/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift index cba70c2..2092cb6 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift @@ -5,9 +5,9 @@ import Foundation /// /// Errors are tried to be compared by their implementation of Equatable, /// otherwise they fallback to comparision by _domain and _code. -public func matchError(error: T) -> NonNilMatcherFunc { +public func matchError(_ error: T) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in - let actualError: ErrorType? = try actualExpression.evaluate() + let actualError: Error? = try actualExpression.evaluate() setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, error: error) return errorMatchesNonNilFieldsOrClosure(actualError, error: error) @@ -16,9 +16,9 @@ public func matchError(error: T) -> NonNilMatcherFunc { /// A Nimble matcher that succeeds when the actual expression evaluates to an /// error of the specified type -public func matchError(errorType: T.Type) -> NonNilMatcherFunc { +public func matchError(_ errorType: T.Type) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in - let actualError: ErrorType? = try actualExpression.evaluate() + let actualError: Error? = try actualExpression.evaluate() setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, errorType: errorType) return errorMatchesNonNilFieldsOrClosure(actualError, errorType: errorType) diff --git a/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift b/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift index c8a9217..02d3245 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift @@ -12,15 +12,15 @@ public struct MatcherFunc: Matcher { public let matcher: (Expression, FailureMessage) throws -> Bool - public init(_ matcher: (Expression, FailureMessage) throws -> Bool) { + public init(_ matcher: @escaping (Expression, FailureMessage) throws -> Bool) { self.matcher = matcher } - public func matches(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + public func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { return try matcher(actualExpression, failureMessage) } - public func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { return try !matcher(actualExpression, failureMessage) } } @@ -39,11 +39,11 @@ public struct MatcherFunc: Matcher { public struct NonNilMatcherFunc: Matcher { public let matcher: (Expression, FailureMessage) throws -> Bool - public init(_ matcher: (Expression, FailureMessage) throws -> Bool) { + public init(_ matcher: @escaping (Expression, FailureMessage) throws -> Bool) { self.matcher = matcher } - public func matches(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + public func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { let pass = try matcher(actualExpression, failureMessage) if try attachNilErrorIfNeeded(actualExpression, failureMessage: failureMessage) { return false @@ -51,7 +51,7 @@ public struct NonNilMatcherFunc: Matcher { return pass } - public func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { let pass = try !matcher(actualExpression, failureMessage) if try attachNilErrorIfNeeded(actualExpression, failureMessage: failureMessage) { return false @@ -59,7 +59,7 @@ public struct NonNilMatcherFunc: Matcher { return pass } - internal func attachNilErrorIfNeeded(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + internal func attachNilErrorIfNeeded(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { if try actualExpression.evaluate() == nil { failureMessage.postfixActual = " (use beNil() to match nils)" return true diff --git a/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift b/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift index 978d54c..ac1eb9d 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift @@ -1,30 +1,36 @@ import Foundation +// `CGFloat` is in Foundation (swift-corelibs-foundation) on Linux. +#if _runtime(_ObjC) + import CoreGraphics +#endif /// Implement this protocol to implement a custom matcher for Swift public protocol Matcher { associatedtype ValueType - func matches(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool - func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool + func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool + func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool } #if _runtime(_ObjC) /// Objective-C interface to the Swift variant of Matcher. @objc public protocol NMBMatcher { - func matches(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool - func doesNotMatch(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool + func matches(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool + func doesNotMatch(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool } #endif #if _runtime(_ObjC) /// Protocol for types that support contain() matcher. @objc public protocol NMBContainer { - func containsObject(object: AnyObject!) -> Bool + @objc(containsObject:) + func contains(_ anObject: Any) -> Bool } -extension NSHashTable : NMBContainer {} // Corelibs Foundation does not include this class yet +// FIXME: NSHashTable can not conform to NMBContainer since swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a +//extension NSHashTable : NMBContainer {} // Corelibs Foundation does not include this class yet #else public protocol NMBContainer { - func containsObject(object: AnyObject) -> Bool + func contains(_ anObject: Any) -> Bool } #endif @@ -52,67 +58,71 @@ extension NSDictionary : NMBCollection {} #if _runtime(_ObjC) /// Protocol for types that support beginWith(), endWith(), beEmpty() matchers @objc public protocol NMBOrderedCollection : NMBCollection { - func indexOfObject(object: AnyObject!) -> Int + @objc(objectAtIndex:) + func object(at index: Int) -> Any } #else public protocol NMBOrderedCollection : NMBCollection { - func indexOfObject(object: AnyObject) -> Int + func object(at index: Int) -> Any } #endif extension NSArray : NMBOrderedCollection {} -#if _runtime(_ObjC) -/// Protocol for types to support beCloseTo() matcher -@objc public protocol NMBDoubleConvertible { - var doubleValue: CDouble { get } -} -#else public protocol NMBDoubleConvertible { var doubleValue: CDouble { get } } extension Double : NMBDoubleConvertible { public var doubleValue: CDouble { - get { - return self - } + return self } } extension Float : NMBDoubleConvertible { public var doubleValue: CDouble { - get { - return CDouble(self) - } + return CDouble(self) + } +} + +extension CGFloat: NMBDoubleConvertible { + public var doubleValue: CDouble { + return CDouble(self) } } -#endif extension NSNumber : NMBDoubleConvertible { } -private let dateFormatter: NSDateFormatter = { - let formatter = NSDateFormatter() +private let dateFormatter: DateFormatter = { + let formatter = DateFormatter() formatter.dateFormat = "yyyy-MM-dd HH:mm:ss.SSSS" - formatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") + formatter.locale = Locale(identifier: "en_US_POSIX") return formatter }() -#if _runtime(_ObjC) +extension Date: NMBDoubleConvertible { + public var doubleValue: CDouble { + return self.timeIntervalSinceReferenceDate + } +} + extension NSDate: NMBDoubleConvertible { public var doubleValue: CDouble { - get { - return self.timeIntervalSinceReferenceDate - } + return self.timeIntervalSinceReferenceDate + } +} + +extension Date: TestOutputStringConvertible { + public var testDescription: String { + return dateFormatter.string(from: self) } } -#endif extension NSDate: TestOutputStringConvertible { public var testDescription: String { - return dateFormatter.stringFromDate(self) + return dateFormatter.string(from: Date(timeIntervalSinceReferenceDate: self.timeIntervalSinceReferenceDate)) } } @@ -122,22 +132,22 @@ extension NSDate: TestOutputStringConvertible { /// Types that conform to Swift's Comparable protocol will work implicitly too #if _runtime(_ObjC) @objc public protocol NMBComparable { - func NMB_compare(otherObject: NMBComparable!) -> NSComparisonResult + func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult } #else // This should become obsolete once Corelibs Foundation adds Comparable conformance to NSNumber public protocol NMBComparable { - func NMB_compare(otherObject: NMBComparable!) -> NSComparisonResult + func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult } #endif extension NSNumber : NMBComparable { - public func NMB_compare(otherObject: NMBComparable!) -> NSComparisonResult { + public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult { return compare(otherObject as! NSNumber) } } extension NSString : NMBComparable { - public func NMB_compare(otherObject: NMBComparable!) -> NSComparisonResult { + public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult { return compare(otherObject as! String) } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift b/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift index 0191f88..84b9d49 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift @@ -1,23 +1,23 @@ import Foundation internal class NotificationCollector { - private(set) var observedNotifications: [NSNotification] - private let notificationCenter: NSNotificationCenter + private(set) var observedNotifications: [Notification] + private let notificationCenter: NotificationCenter #if _runtime(_ObjC) private var token: AnyObject? #else private var token: NSObjectProtocol? #endif - required init(notificationCenter: NSNotificationCenter) { + required init(notificationCenter: NotificationCenter) { self.notificationCenter = notificationCenter self.observedNotifications = [] } func startObserving() { - self.token = self.notificationCenter.addObserverForName(nil, object: nil, queue: nil) { + self.token = self.notificationCenter.addObserver(forName: nil, object: nil, queue: nil) { // linux-swift gets confused by .append(n) - [weak self] n in self?.observedNotifications += [n] + [weak self] n in self?.observedNotifications.append(n) } } @@ -36,31 +36,35 @@ internal class NotificationCollector { private let mainThread = pthread_self() -public func postNotifications( - notificationsMatcher: T, - fromNotificationCenter center: NSNotificationCenter = NSNotificationCenter.defaultCenter()) - -> MatcherFunc { - let _ = mainThread // Force lazy-loading of this value - let collector = NotificationCollector(notificationCenter: center) - collector.startObserving() - var once: Bool = false - return MatcherFunc { actualExpression, failureMessage in - let collectorNotificationsExpression = Expression(memoizedExpression: { _ in - return collector.observedNotifications - }, location: actualExpression.location, withoutCaching: true) +let notificationCenterDefault = NotificationCenter.default - assert(pthread_equal(mainThread, pthread_self()) != 0, "Only expecting closure to be evaluated on main thread.") - if !once { - once = true - try actualExpression.evaluate() - } +public func postNotifications( + _ notificationsMatcher: T, + fromNotificationCenter center: NotificationCenter = notificationCenterDefault) + -> MatcherFunc + where T: Matcher, T.ValueType == [Notification] +{ + let _ = mainThread // Force lazy-loading of this value + let collector = NotificationCollector(notificationCenter: center) + collector.startObserving() + var once: Bool = false + return MatcherFunc { actualExpression, failureMessage in + let collectorNotificationsExpression = Expression(memoizedExpression: { _ in + return collector.observedNotifications + }, location: actualExpression.location, withoutCaching: true) - let match = try notificationsMatcher.matches(collectorNotificationsExpression, failureMessage: failureMessage) - if collector.observedNotifications.isEmpty { - failureMessage.actualValue = "no notifications" - } else { - failureMessage.actualValue = "<\(stringify(collector.observedNotifications))>" - } - return match + assert(pthread_equal(mainThread, pthread_self()) != 0, "Only expecting closure to be evaluated on main thread.") + if !once { + once = true + _ = try actualExpression.evaluate() + } + + let match = try notificationsMatcher.matches(collectorNotificationsExpression, failureMessage: failureMessage) + if collector.observedNotifications.isEmpty { + failureMessage.actualValue = "no notifications" + } else { + failureMessage.actualValue = "<\(stringify(collector.observedNotifications))>" } -} \ No newline at end of file + return match + } +} diff --git a/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift b/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift index ff6b74a..09e28c7 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift @@ -13,7 +13,7 @@ import Foundation /// nil arguments indicates that the matcher should not attempt to match against /// that parameter. public func raiseException( - named named: String? = nil, + named: String? = nil, reason: String? = nil, userInfo: NSDictionary? = nil, closure: ((NSException) -> Void)? = nil) -> MatcherFunc { @@ -25,7 +25,7 @@ public func raiseException( }), finally: nil) capture.tryBlock { - try! actualExpression.evaluate() + _ = try! actualExpression.evaluate() return } @@ -35,7 +35,7 @@ public func raiseException( } internal func setFailureMessageForException( - failureMessage: FailureMessage, + _ failureMessage: FailureMessage, exception: NSException?, named: String?, reason: String?, @@ -60,14 +60,14 @@ internal func setFailureMessageForException( } if let exception = exception { - failureMessage.actualValue = "\(classAsString(exception.dynamicType)) { name=\(exception.name), reason='\(stringify(exception.reason))', userInfo=\(stringify(exception.userInfo)) }" + failureMessage.actualValue = "\(String(describing: type(of: exception))) { name=\(exception.name), reason='\(stringify(exception.reason))', userInfo=\(stringify(exception.userInfo)) }" } else { failureMessage.actualValue = "no exception" } } internal func exceptionMatchesNonNilFieldsOrClosure( - exception: NSException?, + _ exception: NSException?, named: String?, reason: String?, userInfo: NSDictionary?, @@ -77,13 +77,14 @@ internal func exceptionMatchesNonNilFieldsOrClosure( if let exception = exception { matches = true - if named != nil && exception.name != named { + if let named = named, exception.name.rawValue != named { matches = false } if reason != nil && exception.reason != reason { matches = false } - if userInfo != nil && exception.userInfo != userInfo { + if let userInfo = userInfo, let exceptionUserInfo = exception.userInfo, + (exceptionUserInfo as NSDictionary) != userInfo { matches = false } if let closure = closure { @@ -113,8 +114,8 @@ public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { _block = block } - public func matches(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let block: () -> Any? = ({ actualBlock(); return nil }) + public func matches(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + let block: () -> Any? = ({ _ = actualBlock(); return nil }) let expr = Expression(expression: block, location: location) return try! raiseException( @@ -125,11 +126,11 @@ public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { ).matches(expr, failureMessage: failureMessage) } - public func doesNotMatch(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + public func doesNotMatch(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { return !matches(actualBlock, failureMessage: failureMessage, location: location) } - public var named: (name: String) -> NMBObjCRaiseExceptionMatcher { + public var named: (_ name: String) -> NMBObjCRaiseExceptionMatcher { return ({ name in return NMBObjCRaiseExceptionMatcher( name: name, @@ -140,7 +141,7 @@ public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { }) } - public var reason: (reason: String?) -> NMBObjCRaiseExceptionMatcher { + public var reason: (_ reason: String?) -> NMBObjCRaiseExceptionMatcher { return ({ reason in return NMBObjCRaiseExceptionMatcher( name: self._name, @@ -151,7 +152,7 @@ public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { }) } - public var userInfo: (userInfo: NSDictionary?) -> NMBObjCRaiseExceptionMatcher { + public var userInfo: (_ userInfo: NSDictionary?) -> NMBObjCRaiseExceptionMatcher { return ({ userInfo in return NMBObjCRaiseExceptionMatcher( name: self._name, @@ -162,7 +163,7 @@ public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { }) } - public var satisfyingBlock: (block: ((NSException) -> Void)?) -> NMBObjCRaiseExceptionMatcher { + public var satisfyingBlock: (_ block: ((NSException) -> Void)?) -> NMBObjCRaiseExceptionMatcher { return ({ block in return NMBObjCRaiseExceptionMatcher( name: self._name, diff --git a/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift b/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift index d383a31..b24b3ec 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift @@ -2,11 +2,15 @@ import Foundation /// A Nimble matcher that succeeds when the actual value matches with any of the matchers /// provided in the variable list of matchers. -public func satisfyAnyOf(matchers: U...) -> NonNilMatcherFunc { +public func satisfyAnyOf(_ matchers: U...) -> NonNilMatcherFunc + where U: Matcher, U.ValueType == T +{ return satisfyAnyOf(matchers) } -internal func satisfyAnyOf(matchers: [U]) -> NonNilMatcherFunc { +internal func satisfyAnyOf(_ matchers: [U]) -> NonNilMatcherFunc + where U: Matcher, U.ValueType == T +{ return NonNilMatcherFunc { actualExpression, failureMessage in let postfixMessages = NSMutableArray() var matches = false @@ -14,10 +18,10 @@ internal func satisfyAnyOf(matchers: [U] if try matcher.matches(actualExpression, failureMessage: failureMessage) { matches = true } - postfixMessages.addObject(NSString(string: "{\(failureMessage.postfixMessage)}")) + postfixMessages.add(NSString(string: "{\(failureMessage.postfixMessage)}")) } - failureMessage.postfixMessage = "match one of: " + postfixMessages.componentsJoinedByString(", or ") + failureMessage.postfixMessage = "match one of: " + postfixMessages.componentsJoined(by: ", or ") if let actualValue = try actualExpression.evaluate() { failureMessage.actualValue = "\(actualValue)" } @@ -36,7 +40,7 @@ public func ||(left: MatcherFunc, right: MatcherFunc) -> NonNilMatcherF #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func satisfyAnyOfMatcher(matchers: [NMBObjCMatcher]) -> NMBObjCMatcher { + public class func satisfyAnyOfMatcher(_ matchers: [NMBObjCMatcher]) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in if matchers.isEmpty { failureMessage.stringValue = "satisfyAnyOf must be called with at least one matcher" diff --git a/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift b/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift new file mode 100644 index 0000000..67f9cf6 --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift @@ -0,0 +1,55 @@ +import Foundation + +public func throwAssertion() -> MatcherFunc { + return MatcherFunc { actualExpression, failureMessage in + #if arch(x86_64) && _runtime(_ObjC) && !SWIFT_PACKAGE + failureMessage.postfixMessage = "throw an assertion" + failureMessage.actualValue = nil + + var succeeded = true + + let caughtException: BadInstructionException? = catchBadInstruction { + #if os(tvOS) + if (!NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning) { + print() + print("[Nimble Warning]: If you're getting stuck on a debugger breakpoint for a " + + "fatal error while using throwAssertion(), please disable 'Debug Executable' " + + "in your scheme. Go to 'Edit Scheme > Test > Info' and uncheck " + + "'Debug Executable'. If you've already done that, suppress this warning " + + "by setting `NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning = true`. " + + "This is required because the standard methods of catching assertions " + + "(mach APIs) are unavailable for tvOS. Instead, the same mechanism the " + + "debugger uses is the fallback method for tvOS." + ) + print() + NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning = true + } + #endif + do { + try actualExpression.evaluate() + } catch let error { + succeeded = false + failureMessage.postfixMessage += "; threw error instead <\(error)>" + } + } + + if !succeeded { + return false + } + + if caughtException == nil { + return false + } + + return true + #elseif SWIFT_PACKAGE + fatalError("The throwAssertion Nimble matcher does not currently support Swift CLI." + + " You can silence this error by placing the test case inside an #if !SWIFT_PACKAGE" + + " conditional statement") + #else + fatalError("The throwAssertion Nimble matcher can only run on x86_64 platforms with " + + "Objective-C (e.g. Mac, iPhone 5s or later simulators). You can silence this error " + + "by placing the test case inside an #if arch(x86_64) or _runtime(_ObjC) conditional statement") + #endif + } +} diff --git a/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift b/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift index 9563565..8c9b91b 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift @@ -11,15 +11,15 @@ import Foundation /// /// nil arguments indicates that the matcher should not attempt to match against /// that parameter. -public func throwError( - error: T? = nil, +public func throwError( + _ error: T? = nil, errorType: T.Type? = nil, closure: ((T) -> Void)? = nil) -> MatcherFunc { return MatcherFunc { actualExpression, failureMessage in - var actualError: ErrorType? + var actualError: Error? do { - try actualExpression.evaluate() + _ = try actualExpression.evaluate() } catch let catchedError { actualError = catchedError } @@ -33,16 +33,16 @@ public func throwError( /// error or when the passed closures' arbitrary custom matching succeeds. /// /// This duplication to it's generic adequate is required to allow to receive -/// values of the existential type ErrorType in the closure. +/// values of the existential type `Error` in the closure. /// /// The closure only gets called when an error was thrown. public func throwError( - closure closure: ((ErrorType) -> Void)? = nil) -> MatcherFunc { + closure: ((Error) -> Void)? = nil) -> MatcherFunc { return MatcherFunc { actualExpression, failureMessage in - var actualError: ErrorType? + var actualError: Error? do { - try actualExpression.evaluate() + _ = try actualExpression.evaluate() } catch let catchedError { actualError = catchedError } diff --git a/Pods/Nimble/Sources/Nimble/Nimble.h b/Pods/Nimble/Sources/Nimble/Nimble.h index 1eab61a..7885a53 100644 --- a/Pods/Nimble/Sources/Nimble/Nimble.h +++ b/Pods/Nimble/Sources/Nimble/Nimble.h @@ -3,5 +3,12 @@ #import "NMBStringify.h" #import "DSL.h" +#import "CwlCatchException.h" +#import "CwlCatchBadInstruction.h" + +#if TARGET_OS_IPHONE && !TARGET_OS_TV + #import "mach_excServer.h" +#endif + FOUNDATION_EXPORT double NimbleVersionNumber; FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; diff --git a/Pods/Nimble/Sources/Nimble/Utils/Async.swift b/Pods/Nimble/Sources/Nimble/Utils/Async.swift index 8f1a6de..c902692 100644 --- a/Pods/Nimble/Sources/Nimble/Utils/Async.swift +++ b/Pods/Nimble/Sources/Nimble/Utils/Async.swift @@ -1,10 +1,13 @@ +import CoreFoundation +import Dispatch import Foundation -#if _runtime(_ObjC) -import Dispatch +#if !_runtime(_ObjC) + import CDispatch +#endif -private let timeoutLeeway: UInt64 = NSEC_PER_MSEC -private let pollLeeway: UInt64 = NSEC_PER_MSEC +private let timeoutLeeway = DispatchTimeInterval.milliseconds(1) +private let pollLeeway = DispatchTimeInterval.milliseconds(1) /// Stores debugging information about callers internal struct WaitingInfo: CustomStringConvertible { @@ -18,7 +21,7 @@ internal struct WaitingInfo: CustomStringConvertible { } internal protocol WaitLock { - func acquireWaitingLock(fnName: String, file: FileString, line: UInt) + func acquireWaitingLock(_ fnName: String, file: FileString, line: UInt) func releaseWaitingLock() func isWaitingLocked() -> Bool } @@ -27,10 +30,15 @@ internal class AssertionWaitLock: WaitLock { private var currentWaiter: WaitingInfo? = nil init() { } - func acquireWaitingLock(fnName: String, file: FileString, line: UInt) { + func acquireWaitingLock(_ fnName: String, file: FileString, line: UInt) { let info = WaitingInfo(name: fnName, file: file, lineNumber: line) + #if _runtime(_ObjC) + let isMainThread = Thread.isMainThread + #else + let isMainThread = _CFIsMainThread() + #endif nimblePrecondition( - NSThread.isMainThread(), + isMainThread, "InvalidNimbleAPIUsage", "\(fnName) can only run on the main thread." ) @@ -56,32 +64,32 @@ internal class AssertionWaitLock: WaitLock { internal enum AwaitResult { /// Incomplete indicates None (aka - this value hasn't been fulfilled yet) - case Incomplete + case incomplete /// TimedOut indicates the result reached its defined timeout limit before returning - case TimedOut + case timedOut /// BlockedRunLoop indicates the main runloop is too busy processing other blocks to trigger /// the timeout code. /// /// This may also mean the async code waiting upon may have never actually ran within the /// required time because other timers & sources are running on the main run loop. - case BlockedRunLoop + case blockedRunLoop /// The async block successfully executed and returned a given result - case Completed(T) + case completed(T) /// When a Swift Error is thrown - case ErrorThrown(ErrorType) + case errorThrown(Error) /// When an Objective-C Exception is raised - case RaisedException(NSException) + case raisedException(NSException) func isIncomplete() -> Bool { switch self { - case .Incomplete: return true + case .incomplete: return true default: return false } } func isCompleted() -> Bool { switch self { - case .Completed(_): return true + case .completed(_): return true default: return false } } @@ -90,11 +98,11 @@ internal enum AwaitResult { /// Holds the resulting value from an asynchronous expectation. /// This class is thread-safe at receiving an "response" to this promise. internal class AwaitPromise { - private(set) internal var asyncResult: AwaitResult = .Incomplete - private var signal: dispatch_semaphore_t + private(set) internal var asyncResult: AwaitResult = .incomplete + private var signal: DispatchSemaphore init() { - signal = dispatch_semaphore_create(1) + signal = DispatchSemaphore(value: 1) } /// Resolves the promise with the given result if it has not been resolved. Repeated calls to @@ -102,8 +110,8 @@ internal class AwaitPromise { /// /// @returns a Bool that indicates if the async result was accepted or rejected because another /// value was recieved first. - func resolveResult(result: AwaitResult) -> Bool { - if dispatch_semaphore_wait(signal, DISPATCH_TIME_NOW) == 0 { + func resolveResult(_ result: AwaitResult) -> Bool { + if signal.wait(timeout: .now()) == .success { self.asyncResult = result return true } else { @@ -113,8 +121,8 @@ internal class AwaitPromise { } internal struct AwaitTrigger { - let timeoutSource: dispatch_source_t - let actionSource: dispatch_source_t? + let timeoutSource: DispatchSourceTimer + let actionSource: DispatchSourceTimer? let start: () throws -> Void } @@ -139,7 +147,7 @@ internal class AwaitPromiseBuilder { self.trigger = trigger } - func timeout(timeoutInterval: NSTimeInterval, forcefullyAbortTimeout: NSTimeInterval) -> Self { + func timeout(_ timeoutInterval: TimeInterval, forcefullyAbortTimeout: TimeInterval) -> Self { // = Discussion = // // There's a lot of technical decisions here that is useful to elaborate on. This is @@ -168,34 +176,36 @@ internal class AwaitPromiseBuilder { // checked. // // In addition, stopping the run loop is used to halt code executed on the main run loop. - dispatch_source_set_timer( - trigger.timeoutSource, - dispatch_time(DISPATCH_TIME_NOW, Int64(timeoutInterval * Double(NSEC_PER_SEC))), - DISPATCH_TIME_FOREVER, - timeoutLeeway - ) - dispatch_source_set_event_handler(trigger.timeoutSource) { + trigger.timeoutSource.scheduleOneshot( + deadline: DispatchTime.now() + timeoutInterval, + leeway: timeoutLeeway) + trigger.timeoutSource.setEventHandler() { guard self.promise.asyncResult.isIncomplete() else { return } - let timedOutSem = dispatch_semaphore_create(0) - let semTimedOutOrBlocked = dispatch_semaphore_create(0) - dispatch_semaphore_signal(semTimedOutOrBlocked) + let timedOutSem = DispatchSemaphore(value: 0) + let semTimedOutOrBlocked = DispatchSemaphore(value: 0) + semTimedOutOrBlocked.signal() let runLoop = CFRunLoopGetMain() - CFRunLoopPerformBlock(runLoop, kCFRunLoopDefaultMode) { - if dispatch_semaphore_wait(semTimedOutOrBlocked, DISPATCH_TIME_NOW) == 0 { - dispatch_semaphore_signal(timedOutSem) - dispatch_semaphore_signal(semTimedOutOrBlocked) - if self.promise.resolveResult(.TimedOut) { + #if _runtime(_ObjC) + let runLoopMode = CFRunLoopMode.defaultMode.rawValue + #else + let runLoopMode = kCFRunLoopDefaultMode + #endif + CFRunLoopPerformBlock(runLoop, runLoopMode) { + if semTimedOutOrBlocked.wait(timeout: .now()) == .success { + timedOutSem.signal() + semTimedOutOrBlocked.signal() + if self.promise.resolveResult(.timedOut) { CFRunLoopStop(CFRunLoopGetMain()) } } } // potentially interrupt blocking code on run loop to let timeout code run CFRunLoopStop(runLoop) - let now = dispatch_time(DISPATCH_TIME_NOW, Int64(forcefullyAbortTimeout * Double(NSEC_PER_SEC))) - let didNotTimeOut = dispatch_semaphore_wait(timedOutSem, now) != 0 - let timeoutWasNotTriggered = dispatch_semaphore_wait(semTimedOutOrBlocked, 0) == 0 + let now = DispatchTime.now() + forcefullyAbortTimeout + let didNotTimeOut = timedOutSem.wait(timeout: now) != .success + let timeoutWasNotTriggered = semTimedOutOrBlocked.wait(timeout: .now()) == .success if didNotTimeOut && timeoutWasNotTriggered { - if self.promise.resolveResult(.BlockedRunLoop) { + if self.promise.resolveResult(.blockedRunLoop) { CFRunLoopStop(CFRunLoopGetMain()) } } @@ -219,15 +229,15 @@ internal class AwaitPromiseBuilder { /// - The async expectation raised an unexpected exception (objc) /// - The async expectation raised an unexpected error (swift) /// - /// The returned AwaitResult will NEVER be .Incomplete. - func wait(fnName: String = #function, file: FileString = #file, line: UInt = #line) -> AwaitResult { + /// The returned AwaitResult will NEVER be .incomplete. + func wait(_ fnName: String = #function, file: FileString = #file, line: UInt = #line) -> AwaitResult { waitLock.acquireWaitingLock( fnName, file: file, line: line) let capture = NMBExceptionCapture(handler: ({ exception in - self.promise.resolveResult(.RaisedException(exception)) + _ = self.promise.resolveResult(.raisedException(exception)) }), finally: ({ self.waitLock.releaseWaitingLock() })) @@ -235,17 +245,17 @@ internal class AwaitPromiseBuilder { do { try self.trigger.start() } catch let error { - self.promise.resolveResult(.ErrorThrown(error)) + _ = self.promise.resolveResult(.errorThrown(error)) } - dispatch_resume(self.trigger.timeoutSource) + self.trigger.timeoutSource.resume() while self.promise.asyncResult.isIncomplete() { // Stopping the run loop does not work unless we run only 1 mode - NSRunLoop.currentRunLoop().runMode(NSDefaultRunLoopMode, beforeDate: NSDate.distantFuture()) + _ = RunLoop.current.run(mode: .defaultRunLoopMode, before: .distantFuture) } - dispatch_suspend(self.trigger.timeoutSource) - dispatch_source_cancel(self.trigger.timeoutSource) + self.trigger.timeoutSource.suspend() + self.trigger.timeoutSource.cancel() if let asyncSource = self.trigger.actionSource { - dispatch_source_cancel(asyncSource) + asyncSource.cancel() } } @@ -255,29 +265,24 @@ internal class AwaitPromiseBuilder { internal class Awaiter { let waitLock: WaitLock - let timeoutQueue: dispatch_queue_t - let asyncQueue: dispatch_queue_t + let timeoutQueue: DispatchQueue + let asyncQueue: DispatchQueue internal init( waitLock: WaitLock, - asyncQueue: dispatch_queue_t, - timeoutQueue: dispatch_queue_t) { + asyncQueue: DispatchQueue, + timeoutQueue: DispatchQueue) { self.waitLock = waitLock self.asyncQueue = asyncQueue self.timeoutQueue = timeoutQueue } - private func createTimerSource(queue: dispatch_queue_t) -> dispatch_source_t { - return dispatch_source_create( - DISPATCH_SOURCE_TYPE_TIMER, - 0, - DISPATCH_TIMER_STRICT, - queue - ) + private func createTimerSource(_ queue: DispatchQueue) -> DispatchSourceTimer { + return DispatchSource.makeTimerSource(flags: .strict, queue: queue) } func performBlock( - closure: ((T) -> Void) throws -> Void) -> AwaitPromiseBuilder { + _ closure: @escaping (@escaping (T) -> Void) throws -> Void) -> AwaitPromiseBuilder { let promise = AwaitPromise() let timeoutSource = createTimerSource(timeoutQueue) var completionCount = 0 @@ -289,7 +294,7 @@ internal class Awaiter { "InvalidNimbleAPIUsage", "Done closure's was called multiple times. waitUntil(..) expects its " + "completion closure to only be called once.") - if promise.resolveResult(.Completed($0)) { + if promise.resolveResult(.completed($0)) { CFRunLoopStop(CFRunLoopGetMain()) } } @@ -302,27 +307,27 @@ internal class Awaiter { trigger: trigger) } - func poll(pollInterval: NSTimeInterval, closure: () throws -> T?) -> AwaitPromiseBuilder { + func poll(_ pollInterval: TimeInterval, closure: @escaping () throws -> T?) -> AwaitPromiseBuilder { let promise = AwaitPromise() let timeoutSource = createTimerSource(timeoutQueue) let asyncSource = createTimerSource(asyncQueue) let trigger = AwaitTrigger(timeoutSource: timeoutSource, actionSource: asyncSource) { - let interval = UInt64(pollInterval * Double(NSEC_PER_SEC)) - dispatch_source_set_timer(asyncSource, DISPATCH_TIME_NOW, interval, pollLeeway) - dispatch_source_set_event_handler(asyncSource) { + let interval = DispatchTimeInterval.nanoseconds(Int(pollInterval * TimeInterval(NSEC_PER_SEC))) + asyncSource.scheduleRepeating(deadline: .now(), interval: interval, leeway: pollLeeway) + asyncSource.setEventHandler() { do { if let result = try closure() { - if promise.resolveResult(.Completed(result)) { + if promise.resolveResult(.completed(result)) { CFRunLoopStop(CFRunLoopGetCurrent()) } } } catch let error { - if promise.resolveResult(.ErrorThrown(error)) { + if promise.resolveResult(.errorThrown(error)) { CFRunLoopStop(CFRunLoopGetCurrent()) } } } - dispatch_resume(asyncSource) + asyncSource.resume() } return AwaitPromiseBuilder( @@ -334,12 +339,12 @@ internal class Awaiter { } internal func pollBlock( - pollInterval pollInterval: NSTimeInterval, - timeoutInterval: NSTimeInterval, + pollInterval: TimeInterval, + timeoutInterval: TimeInterval, file: FileString, line: UInt, fnName: String = #function, - expression: () throws -> Bool) -> AwaitResult { + expression: @escaping () throws -> Bool) -> AwaitResult { let awaiter = NimbleEnvironment.activeInstance.awaiter let result = awaiter.poll(pollInterval) { () throws -> Bool? in do { @@ -354,5 +359,3 @@ internal func pollBlock( return result } - -#endif diff --git a/Pods/Nimble/Sources/Nimble/Utils/Errors.swift b/Pods/Nimble/Sources/Nimble/Utils/Errors.swift index 29c4723..d424c98 100644 --- a/Pods/Nimble/Sources/Nimble/Utils/Errors.swift +++ b/Pods/Nimble/Sources/Nimble/Utils/Errors.swift @@ -2,10 +2,10 @@ import Foundation // Generic -internal func setFailureMessageForError( - failureMessage: FailureMessage, +internal func setFailureMessageForError( + _ failureMessage: FailureMessage, postfixMessageVerb: String = "throw", - actualError: ErrorType?, + actualError: Error?, error: T? = nil, errorType: T.Type? = nil, closure: ((T) -> Void)? = nil) { @@ -34,24 +34,26 @@ internal func setFailureMessageForError( } } -internal func errorMatchesExpectedError( - actualError: ErrorType, +internal func errorMatchesExpectedError( + _ actualError: Error, expectedError: T) -> Bool { return actualError._domain == expectedError._domain && actualError._code == expectedError._code } -internal func errorMatchesExpectedError( - actualError: ErrorType, - expectedError: T) -> Bool { +internal func errorMatchesExpectedError( + _ actualError: Error, + expectedError: T) -> Bool + where T: Equatable +{ if let actualError = actualError as? T { return actualError == expectedError } return false } -internal func errorMatchesNonNilFieldsOrClosure( - actualError: ErrorType?, +internal func errorMatchesNonNilFieldsOrClosure( + _ actualError: Error?, error: T? = nil, errorType: T.Type? = nil, closure: ((T) -> Void)? = nil) -> Bool { @@ -75,14 +77,21 @@ internal func errorMatchesNonNilFieldsOrClosure( matches = false } } - } else if errorType != nil && closure != nil { - // The closure expects another ErrorType as argument, so this + } else if errorType != nil { + matches = (actualError is T) + // The closure expects another ErrorProtocol as argument, so this // is _supposed_ to fail, so that it becomes more obvious. - let assertions = gatherExpectations { - expect(actualError is T).to(equal(true)) + if let closure = closure { + let assertions = gatherExpectations { + if let actual = actualError as? T { + closure(actual) + } + } + let messages = assertions.map { $0.message } + if messages.count > 0 { + matches = false + } } - precondition(assertions.map { $0.message }.count > 0) - matches = false } } @@ -92,9 +101,9 @@ internal func errorMatchesNonNilFieldsOrClosure( // Non-generic internal func setFailureMessageForError( - failureMessage: FailureMessage, - actualError: ErrorType?, - closure: ((ErrorType) -> Void)?) { + _ failureMessage: FailureMessage, + actualError: Error?, + closure: ((Error) -> Void)?) { failureMessage.postfixMessage = "throw error" if let _ = closure { @@ -111,8 +120,8 @@ internal func setFailureMessageForError( } internal func errorMatchesNonNilFieldsOrClosure( - actualError: ErrorType?, - closure: ((ErrorType) -> Void)?) -> Bool { + _ actualError: Error?, + closure: ((Error) -> Void)?) -> Bool { var matches = false if let actualError = actualError { diff --git a/Pods/Nimble/Sources/Nimble/Utils/Functional.swift b/Pods/Nimble/Sources/Nimble/Utils/Functional.swift index e85c755..6c5126a 100644 --- a/Pods/Nimble/Sources/Nimble/Utils/Functional.swift +++ b/Pods/Nimble/Sources/Nimble/Utils/Functional.swift @@ -1,7 +1,7 @@ import Foundation -extension SequenceType { - internal func all(fn: Generator.Element -> Bool) -> Bool { +extension Sequence { + internal func all(_ fn: (Iterator.Element) -> Bool) -> Bool { for item in self { if !fn(item) { return false diff --git a/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift b/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift index 4edead3..012e1e3 100644 --- a/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift +++ b/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift @@ -1,23 +1,21 @@ import Foundation -internal func identityAsString(value: AnyObject?) -> String { - if let value = value { - return NSString(format: "<%p>", unsafeBitCast(value, Int.self)).description +internal func identityAsString(_ value: Any?) -> String { + let anyObject: AnyObject? +#if os(Linux) + anyObject = value as? AnyObject +#else + anyObject = value as AnyObject? +#endif + if let value = anyObject { + return NSString(format: "<%p>", unsafeBitCast(value, to: Int.self)).description } else { return "nil" } } -internal func classAsString(cls: AnyClass) -> String { -#if _runtime(_ObjC) - return NSStringFromClass(cls) -#else - return String(cls) -#endif -} - -internal func arrayAsString(items: [T], joiner: String = ", ") -> String { +internal func arrayAsString(_ items: [T], joiner: String = ", ") -> String { return items.reduce("") { accum, item in let prefix = (accum.isEmpty ? "" : joiner) return accum + prefix + "\(stringify(item))" @@ -37,13 +35,13 @@ public protocol TestOutputStringConvertible { extension Double: TestOutputStringConvertible { public var testDescription: String { - return NSNumber(double: self).testDescription + return NSNumber(value: self).testDescription } } extension Float: TestOutputStringConvertible { public var testDescription: String { - return NSNumber(float: self).testDescription + return NSNumber(value: self).testDescription } } @@ -54,14 +52,22 @@ extension NSNumber: TestOutputStringConvertible { public var testDescription: String { let description = self.description - if description.containsString(".") { + if description.contains(".") { // Travis linux swiftpm build doesn't like casting String to NSString, // which is why this annoying nested initializer thing is here. // Maybe this will change in a future snapshot. let decimalPlaces = NSString(string: NSString(string: description) - .componentsSeparatedByString(".")[1]) - - if decimalPlaces.length > 4 { + .components(separatedBy: ".")[1]) + + // SeeAlso: https://bugs.swift.org/browse/SR-1464 + switch decimalPlaces.length { + case 1: + return NSString(format: "%0.1f", self.doubleValue).description + case 2: + return NSString(format: "%0.2f", self.doubleValue).description + case 3: + return NSString(format: "%0.3f", self.doubleValue).description + default: return NSString(format: "%0.4f", self.doubleValue).description } } @@ -71,16 +77,16 @@ extension NSNumber: TestOutputStringConvertible { extension Array: TestOutputStringConvertible { public var testDescription: String { - let list = self.map(Nimble.stringify).joinWithSeparator(", ") + let list = self.map(Nimble.stringify).joined(separator: ", ") return "[\(list)]" } } extension AnySequence: TestOutputStringConvertible { public var testDescription: String { - let generator = self.generate() + let generator = self.makeIterator() var strings = [String]() - var value: AnySequence.Generator.Element? + var value: AnySequence.Iterator.Element? repeat { value = generator.next() @@ -89,21 +95,21 @@ extension AnySequence: TestOutputStringConvertible { } } while value != nil - let list = strings.joinWithSeparator(", ") + let list = strings.joined(separator: ", ") return "[\(list)]" } } extension NSArray: TestOutputStringConvertible { public var testDescription: String { - let list = Array(self).map(Nimble.stringify).joinWithSeparator(", ") + let list = Array(self).map(Nimble.stringify).joined(separator: ", ") return "(\(list))" } } extension NSIndexSet: TestOutputStringConvertible { public var testDescription: String { - let list = Array(self).map(Nimble.stringify).joinWithSeparator(", ") + let list = Array(self).map(Nimble.stringify).joined(separator: ", ") return "(\(list))" } } @@ -114,13 +120,13 @@ extension String: TestOutputStringConvertible { } } -extension NSData: TestOutputStringConvertible { +extension Data: TestOutputStringConvertible { public var testDescription: String { #if os(Linux) // FIXME: Swift on Linux triggers a segfault when calling NSData's hash() (last checked on 03-11-16) - return "NSData" + return "Data" #else - return "NSData" + return "Data" #endif } } @@ -139,8 +145,7 @@ extension NSData: TestOutputStringConvertible { /// will return the result of constructing a string from the value. /// /// - SeeAlso: `TestOutputStringConvertible` -@warn_unused_result -public func stringify(value: T) -> String { +public func stringify(_ value: T) -> String { if let value = value as? TestOutputStringConvertible { return value.testDescription } @@ -149,12 +154,11 @@ public func stringify(value: T) -> String { return value.debugDescription } - return String(value) + return String(describing: value) } /// -SeeAlso: `stringify(value: T)` -@warn_unused_result -public func stringify(value: T?) -> String { +public func stringify(_ value: T?) -> String { if let unboxed = value { return stringify(unboxed) } @@ -163,9 +167,47 @@ public func stringify(value: T?) -> String { #if _runtime(_ObjC) @objc public class NMBStringer: NSObject { - @warn_unused_result - @objc public class func stringify(obj: AnyObject?) -> String { + @objc public class func stringify(_ obj: Any?) -> String { return Nimble.stringify(obj) } } #endif + +// MARK: Collection Type Stringers + +/// Attempts to generate a pretty type string for a given value. If the value is of a Objective-C +/// collection type, or a subclass thereof, (e.g. `NSArray`, `NSDictionary`, etc.). +/// This function will return the type name of the root class of the class cluster for better +/// readability (e.g. `NSArray` instead of `__NSArrayI`). +/// +/// For values that don't have a type of an Objective-C collection, this function returns the +/// default type description. +/// +/// - parameter value: A value that will be used to determine a type name. +/// +/// - returns: The name of the class cluster root class for Objective-C collection types, or the +/// the `dynamicType` of the value for values of any other type. +public func prettyCollectionType(_ value: T) -> String { + switch value { + case is NSArray: + return String(describing: NSArray.self) + case is NSDictionary: + return String(describing: NSDictionary.self) + case is NSSet: + return String(describing: NSSet.self) + case is NSIndexSet: + return String(describing: NSIndexSet.self) + default: + return String(describing: value) + } +} + +/// Returns the type name for a given collection type. This overload is used by Swift +/// collection types. +/// +/// - parameter collection: A Swift `CollectionType` value. +/// +/// - returns: A string representing the `dynamicType` of the value. +public func prettyCollectionType(_ collection: T) -> String { + return String(describing: type(of: collection)) +} diff --git a/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/CurrentTestCaseTracker.h b/Pods/Nimble/Sources/NimbleObjectiveC/CurrentTestCaseTracker.h similarity index 100% rename from Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/CurrentTestCaseTracker.h rename to Pods/Nimble/Sources/NimbleObjectiveC/CurrentTestCaseTracker.h diff --git a/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h b/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h new file mode 100644 index 0000000..54677ee --- /dev/null +++ b/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h @@ -0,0 +1,377 @@ +#import + +@class NMBExpectation; +@class NMBObjCBeCloseToMatcher; +@class NMBObjCRaiseExceptionMatcher; +@protocol NMBMatcher; + + +NS_ASSUME_NONNULL_BEGIN + + +#define NIMBLE_OVERLOADABLE __attribute__((overloadable)) +#define NIMBLE_EXPORT FOUNDATION_EXPORT +#define NIMBLE_EXPORT_INLINE FOUNDATION_STATIC_INLINE + +#define NIMBLE_VALUE_OF(VAL) ({ \ + __typeof__((VAL)) val = (VAL); \ + [NSValue valueWithBytes:&val objCType:@encode(__typeof__((VAL)))]; \ +}) + +#ifdef NIMBLE_DISABLE_SHORT_SYNTAX +#define NIMBLE_SHORT(PROTO, ORIGINAL) +#define NIMBLE_SHORT_OVERLOADED(PROTO, ORIGINAL) +#else +#define NIMBLE_SHORT(PROTO, ORIGINAL) FOUNDATION_STATIC_INLINE PROTO { return (ORIGINAL); } +#define NIMBLE_SHORT_OVERLOADED(PROTO, ORIGINAL) FOUNDATION_STATIC_INLINE NIMBLE_OVERLOADABLE PROTO { return (ORIGINAL); } +#endif + + + +#define DEFINE_NMB_EXPECT_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + NMBExpectation *NMB_expect(TYPE(^actualBlock)(), NSString *file, NSUInteger line) { \ + return NMB_expect(^id { return EXPR; }, file, line); \ + } + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + NMBExpectation *NMB_expect(id(^actualBlock)(), NSString *file, NSUInteger line); + + // overloaded dispatch for nils - expect(nil) + DEFINE_NMB_EXPECT_OVERLOAD(void*, nil) + DEFINE_NMB_EXPECT_OVERLOAD(NSRange, NIMBLE_VALUE_OF(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(long, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(unsigned long, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(int, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(unsigned int, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(float, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(double, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(long long, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(unsigned long long, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(char, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(unsigned char, @(actualBlock())) + // bool doesn't get the compiler to dispatch to BOOL types, but using BOOL here seems to allow + // the compiler to dispatch to bool. + DEFINE_NMB_EXPECT_OVERLOAD(BOOL, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(char *, @(actualBlock())) + + +#undef DEFINE_NMB_EXPECT_OVERLOAD + + + +NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(), NSString *file, NSUInteger line); + + + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_equal(TYPE expectedValue) { \ + return NMB_equal((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id equal(TYPE expectedValue), NMB_equal(expectedValue)); + + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_equal(__nullable id expectedValue); + + NIMBLE_SHORT_OVERLOADED(id equal(__nullable id expectedValue), + NMB_equal(expectedValue)); + + // overloaded dispatch for nils - expect(nil) + DEFINE_OVERLOAD(void*__nullable, (id)nil) + DEFINE_OVERLOAD(NSRange, NIMBLE_VALUE_OF(expectedValue)) + DEFINE_OVERLOAD(long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long, @(expectedValue)) + DEFINE_OVERLOAD(int, @(expectedValue)) + DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(float, @(expectedValue)) + DEFINE_OVERLOAD(double, @(expectedValue)) + DEFINE_OVERLOAD(long long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) + DEFINE_OVERLOAD(char, @(expectedValue)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + // bool doesn't get the compiler to dispatch to BOOL types, but using BOOL here seems to allow + // the compiler to dispatch to bool. + DEFINE_OVERLOAD(BOOL, @(expectedValue)) + DEFINE_OVERLOAD(char *, @(expectedValue)) + +#undef DEFINE_OVERLOAD + + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_haveCount(TYPE expectedValue) { \ + return NMB_haveCount((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id haveCount(TYPE expectedValue), \ + NMB_haveCount(expectedValue)); + + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_haveCount(id expectedValue); + + NIMBLE_SHORT_OVERLOADED(id haveCount(id expectedValue), + NMB_haveCount(expectedValue)); + + DEFINE_OVERLOAD(long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long, @(expectedValue)) + DEFINE_OVERLOAD(int, @(expectedValue)) + DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(long long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) + DEFINE_OVERLOAD(char, @(expectedValue)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + +#undef DEFINE_OVERLOAD + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + NMBObjCBeCloseToMatcher *NMB_beCloseTo(TYPE expectedValue) { \ + return NMB_beCloseTo((NSNumber *)(EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToMatcher *beCloseTo(TYPE expectedValue), \ + NMB_beCloseTo(expectedValue)); + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue); + NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToMatcher *beCloseTo(NSNumber *expectedValue), + NMB_beCloseTo(expectedValue)); + + // it would be better to only overload float & double, but zero becomes ambigious + + DEFINE_OVERLOAD(long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long, @(expectedValue)) + DEFINE_OVERLOAD(int, @(expectedValue)) + DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(float, @(expectedValue)) + DEFINE_OVERLOAD(double, @(expectedValue)) + DEFINE_OVERLOAD(long long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) + DEFINE_OVERLOAD(char, @(expectedValue)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + +#undef DEFINE_OVERLOAD + +NIMBLE_EXPORT id NMB_beAnInstanceOf(Class expectedClass); +NIMBLE_EXPORT_INLINE id beAnInstanceOf(Class expectedClass) { + return NMB_beAnInstanceOf(expectedClass); +} + +NIMBLE_EXPORT id NMB_beAKindOf(Class expectedClass); +NIMBLE_EXPORT_INLINE id beAKindOf(Class expectedClass) { + return NMB_beAKindOf(expectedClass); +} + +NIMBLE_EXPORT id NMB_beginWith(id itemElementOrSubstring); +NIMBLE_EXPORT_INLINE id beginWith(id itemElementOrSubstring) { + return NMB_beginWith(itemElementOrSubstring); +} + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_beGreaterThan(TYPE expectedValue) { \ + return NMB_beGreaterThan((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id beGreaterThan(TYPE expectedValue), NMB_beGreaterThan(expectedValue)); + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_beGreaterThan(NSNumber *expectedValue); + + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE + id beGreaterThan(NSNumber *expectedValue) { + return NMB_beGreaterThan(expectedValue); + } + + DEFINE_OVERLOAD(long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long, @(expectedValue)) + DEFINE_OVERLOAD(int, @(expectedValue)) + DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(long long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) + DEFINE_OVERLOAD(char, @(expectedValue)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + +#undef DEFINE_OVERLOAD + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_beGreaterThanOrEqualTo(TYPE expectedValue) { \ + return NMB_beGreaterThanOrEqualTo((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id beGreaterThanOrEqualTo(TYPE expectedValue), \ + NMB_beGreaterThanOrEqualTo(expectedValue)); + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue); + + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE + id beGreaterThanOrEqualTo(NSNumber *expectedValue) { + return NMB_beGreaterThanOrEqualTo(expectedValue); + } + + DEFINE_OVERLOAD(long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long, @(expectedValue)) + DEFINE_OVERLOAD(int, @(expectedValue)) + DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(float, @(expectedValue)) + DEFINE_OVERLOAD(double, @(expectedValue)) + DEFINE_OVERLOAD(long long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) + DEFINE_OVERLOAD(char, @(expectedValue)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + + +#undef DEFINE_OVERLOAD + +NIMBLE_EXPORT id NMB_beIdenticalTo(id expectedInstance); +NIMBLE_SHORT(id beIdenticalTo(id expectedInstance), + NMB_beIdenticalTo(expectedInstance)); + +NIMBLE_EXPORT id NMB_be(id expectedInstance); +NIMBLE_SHORT(id be(id expectedInstance), + NMB_be(expectedInstance)); + + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_beLessThan(TYPE expectedValue) { \ + return NMB_beLessThan((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id beLessThan(TYPE expectedValue), \ + NMB_beLessThan(expectedValue)); + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_beLessThan(NSNumber *expectedValue); + + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE + id beLessThan(NSNumber *expectedValue) { + return NMB_beLessThan(expectedValue); + } + + DEFINE_OVERLOAD(long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long, @(expectedValue)) + DEFINE_OVERLOAD(int, @(expectedValue)) + DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(float, @(expectedValue)) + DEFINE_OVERLOAD(double, @(expectedValue)) + DEFINE_OVERLOAD(long long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) + DEFINE_OVERLOAD(char, @(expectedValue)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + +#undef DEFINE_OVERLOAD + + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_beLessThanOrEqualTo(TYPE expectedValue) { \ + return NMB_beLessThanOrEqualTo((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id beLessThanOrEqualTo(TYPE expectedValue), \ + NMB_beLessThanOrEqualTo(expectedValue)); + + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_beLessThanOrEqualTo(NSNumber *expectedValue); + + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE + id beLessThanOrEqualTo(NSNumber *expectedValue) { + return NMB_beLessThanOrEqualTo(expectedValue); + } + + DEFINE_OVERLOAD(long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long, @(expectedValue)) + DEFINE_OVERLOAD(int, @(expectedValue)) + DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(float, @(expectedValue)) + DEFINE_OVERLOAD(double, @(expectedValue)) + DEFINE_OVERLOAD(long long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) + DEFINE_OVERLOAD(char, @(expectedValue)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + +#undef DEFINE_OVERLOAD + +NIMBLE_EXPORT id NMB_beTruthy(void); +NIMBLE_SHORT(id beTruthy(void), + NMB_beTruthy()); + +NIMBLE_EXPORT id NMB_beFalsy(void); +NIMBLE_SHORT(id beFalsy(void), + NMB_beFalsy()); + +NIMBLE_EXPORT id NMB_beTrue(void); +NIMBLE_SHORT(id beTrue(void), + NMB_beTrue()); + +NIMBLE_EXPORT id NMB_beFalse(void); +NIMBLE_SHORT(id beFalse(void), + NMB_beFalse()); + +NIMBLE_EXPORT id NMB_beNil(void); +NIMBLE_SHORT(id beNil(void), + NMB_beNil()); + +NIMBLE_EXPORT id NMB_beEmpty(void); +NIMBLE_SHORT(id beEmpty(void), + NMB_beEmpty()); + +NIMBLE_EXPORT id NMB_containWithNilTermination(id itemOrSubstring, ...) NS_REQUIRES_NIL_TERMINATION; +#define NMB_contain(...) NMB_containWithNilTermination(__VA_ARGS__, nil) +#ifndef NIMBLE_DISABLE_SHORT_SYNTAX +#define contain(...) NMB_contain(__VA_ARGS__) +#endif + +NIMBLE_EXPORT id NMB_endWith(id itemElementOrSubstring); +NIMBLE_SHORT(id endWith(id itemElementOrSubstring), + NMB_endWith(itemElementOrSubstring)); + +NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException(void); +NIMBLE_SHORT(NMBObjCRaiseExceptionMatcher *raiseException(void), + NMB_raiseException()); + +NIMBLE_EXPORT id NMB_match(id expectedValue); +NIMBLE_SHORT(id match(id expectedValue), + NMB_match(expectedValue)); + +NIMBLE_EXPORT id NMB_allPass(id matcher); +NIMBLE_SHORT(id allPass(id matcher), + NMB_allPass(matcher)); + +NIMBLE_EXPORT id NMB_satisfyAnyOfWithMatchers(id matchers); +#define NMB_satisfyAnyOf(...) NMB_satisfyAnyOfWithMatchers(@[__VA_ARGS__]) +#ifndef NIMBLE_DISABLE_SHORT_SYNTAX +#define satisfyAnyOf(...) NMB_satisfyAnyOf(__VA_ARGS__) +#endif + +// In order to preserve breakpoint behavior despite using macros to fill in __FILE__ and __LINE__, +// define a builder that populates __FILE__ and __LINE__, and returns a block that takes timeout +// and action arguments. See https://github.com/Quick/Quick/pull/185 for details. +typedef void (^NMBWaitUntilTimeoutBlock)(NSTimeInterval timeout, void (^action)(void (^)(void))); +typedef void (^NMBWaitUntilBlock)(void (^action)(void (^)(void))); + +NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line); + +NIMBLE_EXPORT NMBWaitUntilTimeoutBlock NMB_waitUntilTimeoutBuilder(NSString *file, NSUInteger line); +NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger line); + +NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line); + +#define NMB_waitUntilTimeout NMB_waitUntilTimeoutBuilder(@(__FILE__), __LINE__) +#define NMB_waitUntil NMB_waitUntilBuilder(@(__FILE__), __LINE__) + +#ifndef NIMBLE_DISABLE_SHORT_SYNTAX +#define expect(...) NMB_expect(^{ return (__VA_ARGS__); }, @(__FILE__), __LINE__) +#define expectAction(BLOCK) NMB_expectAction((BLOCK), @(__FILE__), __LINE__) +#define failWithMessage(msg) NMB_failWithMessage(msg, @(__FILE__), __LINE__) +#define fail() failWithMessage(@"fail() always fails") + + +#define waitUntilTimeout NMB_waitUntilTimeout +#define waitUntil NMB_waitUntil + +#undef NIMBLE_VALUE_OF + +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/DSL.m b/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m similarity index 83% rename from Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/DSL.m rename to Pods/Nimble/Sources/NimbleObjectiveC/DSL.m index 2170238..cd93ddd 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/DSL.m +++ b/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m @@ -9,7 +9,11 @@ + (void)untilFile:(NSString *)file line:(NSUInteger)line action:(void(^)())actio @end -NIMBLE_EXPORT NMBExpectation *NMB_expect(id(^actualBlock)(), NSString *file, NSUInteger line) { + +NS_ASSUME_NONNULL_BEGIN + + +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBExpectation *__nonnull NMB_expect(id __nullable(^actualBlock)(), NSString *__nonnull file, NSUInteger line) { return [[NMBExpectation alloc] initWithActualBlock:actualBlock negative:NO file:file @@ -35,7 +39,7 @@ NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger return [NMBObjCMatcher beAKindOfMatcher:expectedClass]; } -NIMBLE_EXPORT NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue) { +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue) { return [NMBObjCMatcher beCloseToMatcher:expectedValue within:0.001]; } @@ -43,11 +47,11 @@ NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger return [NMBObjCMatcher beginWithMatcher:itemElementOrSubstring]; } -NIMBLE_EXPORT id NMB_beGreaterThan(NSNumber *expectedValue) { +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beGreaterThan(NSNumber *expectedValue) { return [NMBObjCMatcher beGreaterThanMatcher:expectedValue]; } -NIMBLE_EXPORT id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue) { +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue) { return [NMBObjCMatcher beGreaterThanOrEqualToMatcher:expectedValue]; } @@ -59,11 +63,11 @@ NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger return [NMBObjCMatcher beIdenticalToMatcher:expectedInstance]; } -NIMBLE_EXPORT id NMB_beLessThan(NSNumber *expectedValue) { +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beLessThan(NSNumber *expectedValue) { return [NMBObjCMatcher beLessThanMatcher:expectedValue]; } -NIMBLE_EXPORT id NMB_beLessThanOrEqualTo(NSNumber *expectedValue) { +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beLessThanOrEqualTo(NSNumber *expectedValue) { return [NMBObjCMatcher beLessThanOrEqualToMatcher:expectedValue]; } @@ -113,11 +117,11 @@ NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger return [NMBObjCMatcher endWithMatcher:itemElementOrSubstring]; } -NIMBLE_EXPORT id NMB_equal(id expectedValue) { +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_equal(__nullable id expectedValue) { return [NMBObjCMatcher equalMatcher:expectedValue]; } -NIMBLE_EXPORT id NMB_haveCount(id expectedValue) { +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_haveCount(id expectedValue) { return [NMBObjCMatcher haveCountMatcher:expectedValue]; } @@ -148,3 +152,5 @@ NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger [NMBWait untilFile:file line:line action:action]; }; } + +NS_ASSUME_NONNULL_END diff --git a/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h b/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h new file mode 100644 index 0000000..e0ec05a --- /dev/null +++ b/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h @@ -0,0 +1,11 @@ +#import +#import + +@interface NMBExceptionCapture : NSObject + +- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)())finally; +- (void)tryBlock:(void(^ _Nonnull)())unsafeBlock NS_SWIFT_NAME(tryBlock(_:)); + +@end + +typedef void(^NMBSourceCallbackBlock)(BOOL successful); diff --git a/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBExceptionCapture.m b/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m similarity index 60% rename from Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBExceptionCapture.m rename to Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m index d19d5d9..0a882b7 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBExceptionCapture.m +++ b/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m @@ -1,13 +1,13 @@ #import "NMBExceptionCapture.h" @interface NMBExceptionCapture () -@property (nonatomic, copy) void(^handler)(NSException *exception); -@property (nonatomic, copy) void(^finally)(); +@property (nonatomic, copy) void(^ _Nullable handler)(NSException * _Nullable); +@property (nonatomic, copy) void(^ _Nullable finally)(); @end @implementation NMBExceptionCapture -- (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally { +- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)())finally { self = [super init]; if (self) { self.handler = handler; @@ -16,7 +16,7 @@ - (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally return self; } -- (void)tryBlock:(void(^)())unsafeBlock { +- (void)tryBlock:(void(^ _Nonnull)())unsafeBlock { @try { unsafeBlock(); } diff --git a/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBStringify.h b/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h similarity index 100% rename from Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBStringify.h rename to Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h diff --git a/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBStringify.m b/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m similarity index 100% rename from Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/NMBStringify.m rename to Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m diff --git a/Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/XCTestObservationCenter+Register.m b/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m similarity index 100% rename from Pods/Nimble/Sources/Nimble/Adapters/ObjectiveC/XCTestObservationCenter+Register.m rename to Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index 369595a..f2c09ba 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -7,226 +7,237 @@ objects = { /* Begin PBXBuildFile section */ - 0072016FECB4F11D51CF666F71713F9E /* NSString+Nocilla.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DA8F5655DFE6949CA30A88FD740A18B /* NSString+Nocilla.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 01FB80B2F451C84E420EF3464F5BA926 /* LSHTTPClientHook.m in Sources */ = {isa = PBXBuildFile; fileRef = DB998CB4C2F2B143F59EEE0FE9D1274D /* LSHTTPClientHook.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 02411A2CA73A4024FDD335D6E08970AF /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = C003AAA0D11CDA242DD3A3C5AEA13800 /* QuickTestSuite.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 025A65355371D3AD706C8D334D8AE4EA /* SwiftTask-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 29DB305A733900DA8BE91E99DA1F6678 /* SwiftTask-dummy.m */; }; - 037277A5335F4706D656E27E5DD15D11 /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = B1E3F6C9016D030279790B508587F4F5 /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0467369F19D8A99FD4F12FCA92C4D0D4 /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87A7B61AC940A1FD19E52AE798DB0361 /* Match.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 073CCD3D1AE9A6857F9DC0CFAA511F6A /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = E67AD8E1BA3D5AE433588B5D864123CA /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0A3806CD95128F25EE8B4C806FC19522 /* LSStubResponseDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 6ABDA7E71C2F0EA181105310A6FC9F60 /* LSStubResponseDSL.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 0072016FECB4F11D51CF666F71713F9E /* NSString+Nocilla.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C2313AA64F552CF741242BF1E85CBD0 /* NSString+Nocilla.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 01FB80B2F451C84E420EF3464F5BA926 /* LSHTTPClientHook.m in Sources */ = {isa = PBXBuildFile; fileRef = E272E2EF71853703F3CDA826A479D7D4 /* LSHTTPClientHook.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 02411A2CA73A4024FDD335D6E08970AF /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3507870BD8CED56783352123A181B21 /* QuickTestSuite.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 025A65355371D3AD706C8D334D8AE4EA /* SwiftTask-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = AA03013C5E3F1A694BE38DD7C0747083 /* SwiftTask-dummy.m */; }; + 0A3806CD95128F25EE8B4C806FC19522 /* LSStubResponseDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A8D751B7AB839DBD8B329F322ACE480 /* LSStubResponseDSL.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 0A560EBC0C04B8BBACD9799150B7F691 /* UIView+AstroGadgets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A44E47EFD289B10910E4FDA903A2E9F /* UIView+AstroGadgets.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 0A7381A552E9A17370BA555076EAC4CD /* NibLoadableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C76B609C247B56F32515A6D847A8799 /* NibLoadableView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 0A9A1B8CB1963791ADDF67361E687CAA /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = CB1DDBDCCC983F8C7DBAE01E30388C2D /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0BC644233E7FC0A53C9BA5EC6B87A206 /* NSRegularExpression+Matcheable.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BD5AAB63C0A5D8E5DC6EE658F519C3E /* NSRegularExpression+Matcheable.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 0D96C808906230C689C8310AC8E7DF5B /* LSNSURLSessionHook.h in Headers */ = {isa = PBXBuildFile; fileRef = D7E2DFFAF9C53B8870CECB5F7F64089D /* LSNSURLSessionHook.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 10E5217B88726E3ADF9F527A88A78661 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A84B567667740EA1C67D0C60C243975 /* MultipartFormData.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 11D702668C883B3F7432A61A48FCCB41 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23AFD3DA2A1EE218A39A93ACE7800FEA /* Configuration.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 0BC644233E7FC0A53C9BA5EC6B87A206 /* NSRegularExpression+Matcheable.m in Sources */ = {isa = PBXBuildFile; fileRef = B94F3CBB538ACF449363BC620B9D1CF2 /* NSRegularExpression+Matcheable.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 0CFF6C6170F28B6C7E7EC9125AA4505A /* CwlCatchException.h in Headers */ = {isa = PBXBuildFile; fileRef = ECC26F252B23C600F903B093D4B41AF5 /* CwlCatchException.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0D96C808906230C689C8310AC8E7DF5B /* LSNSURLSessionHook.h in Headers */ = {isa = PBXBuildFile; fileRef = CB7F6F3D25B1B9326B861E03928584A0 /* LSNSURLSessionHook.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 105C93C00BC8EC4B64164D455D7B7C28 /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ADE5BA3EB0182FBE990418A9615C789 /* QuickConfiguration.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 10E5217B88726E3ADF9F527A88A78661 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAC16159CA27E2B96D85107C58D896DA /* MultipartFormData.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 11D702668C883B3F7432A61A48FCCB41 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20AEC20748F1663BACBD6FD36F120697 /* Configuration.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 11DFBA22CC629A4D5E4F9F4A3E05B75F /* UICollectionView+AstroGadgets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35BD3EF4780C95F238BF55A79833BFFC /* UICollectionView+AstroGadgets.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 11E8E61CBBF1A019E711DE8E55F513D4 /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40766F0C467159B985AA2723FF099609 /* Log.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 128B9A07E9D0F95B28E5F1F3483CB7EA /* LSASIHTTPRequestAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = A49E53C084F80BE60CCD84F9475612BF /* LSASIHTTPRequestAdapter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 15A7217C749314E8423F3C36A99BAF7A /* LSHTTPStubURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 06DA7638B59C97A622CF8EC4E26CBF68 /* LSHTTPStubURLProtocol.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 161201824EE3922A10F509AB4F2DB523 /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5395BBA7A071CBF3AFE75B515C61368 /* BeCloseTo.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 179AC473A3676744F7C995FA8E680064 /* XCTestObservationCenter+Register.m in Sources */ = {isa = PBXBuildFile; fileRef = 334E9C3CECC5351EE96F55569E1FCEDD /* XCTestObservationCenter+Register.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 192AA689FCF000B724E91DD2E0A5C801 /* NimbleEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = C662FFC3C402F839DE09A67255100AA2 /* NimbleEnvironment.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 192C4EF47D90895E51E5597323364A3C /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 764D110FFFCD4147FAB007F5CC15C39E /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1C46D0414C094C95AD85104D38B72539 /* LSMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D1F363DAC6ADA834FD28B2BA055E4F7 /* LSMatcher.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 1CE0C305D051ECE68B8BD3FDBC3EE4D9 /* SwiftTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C3BAC8C7B9A07799DE46B602D115B02 /* SwiftTask.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1D00380CB24FD873D03376CC6E9C55E1 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 213754F1822D3389F0626B85751B244C /* DSL.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 1DD2CCAC7B2E2F5BAE6C0199EC87D7C0 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DF25ABEEAE287B7BAF35696B5ABBB4F /* ParameterEncoding.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 201D66DFA5AB096795ACF405E47F4FF0 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8605659EDD36D55482C9DB2EBE1A8A33 /* TaskDelegate.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 2070701995190A07047F664492D7F156 /* LSNocilla.h in Headers */ = {isa = PBXBuildFile; fileRef = 59A8DB2950CDF625EDB83CE63F46A6F6 /* LSNocilla.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2179DCAF26B5FDFE0367910B2CE6A19B /* JSONSubscripting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BE2DE3A06C049929FED7B6EA5BD77C1 /* JSONSubscripting.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 1204045A1E149162E67122B01E22C5B9 /* CwlCatchBadInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 11D1BE32ADBFF181084FAEA58AD60F2E /* CwlCatchBadInstruction.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 128B9A07E9D0F95B28E5F1F3483CB7EA /* LSASIHTTPRequestAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = 298DABB9BB2FB2DA441B86731F89F528 /* LSASIHTTPRequestAdapter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 15A7217C749314E8423F3C36A99BAF7A /* LSHTTPStubURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 7840488B0C9AC5B861B63FCAB5403828 /* LSHTTPStubURLProtocol.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1997E66C5123E7585AA36A4EA3316C42 /* CwlDarwinDefinitions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1EEFE62DC28EB867B24D2CA0FC31F8D /* CwlDarwinDefinitions.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 1C39F4BC3297E91BA401DFA50D28E64F /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E6B807B9FCF2B8E6DA445C4AEFE4B21 /* DSL.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 1C46D0414C094C95AD85104D38B72539 /* LSMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 2ADACDEBD467D10513EA63E6102B2F22 /* LSMatcher.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 1CE0C305D051ECE68B8BD3FDBC3EE4D9 /* SwiftTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 20223D11D9ABF2E670D1730866CBBEF7 /* SwiftTask.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1DD2CCAC7B2E2F5BAE6C0199EC87D7C0 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = A346B699DF993A151E729D2F74E3B255 /* ParameterEncoding.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 201D66DFA5AB096795ACF405E47F4FF0 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9B9194A62FB724B6DEAA468282686C /* TaskDelegate.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 2070701995190A07047F664492D7F156 /* LSNocilla.h in Headers */ = {isa = PBXBuildFile; fileRef = 0DC9E56A8D14C7D63CD12CA5A1D410A5 /* LSNocilla.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2179DCAF26B5FDFE0367910B2CE6A19B /* JSONSubscripting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 945B1EE88D0505DC2B5B3774DD239515 /* JSONSubscripting.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 21B9BDF15D08F33883999509AC98847C /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4D54383DE9F48DD36B48F77E57BF01E /* CFNetwork.framework */; }; - 23F9469701D519F1496D3030618FD84B /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15AB7D4A43EBBAA638AF047CF1486BC7 /* World.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 24B569099A40F837596002531AEBBE6C /* Nocilla-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F2A3A410983B0ACAC5571383B99CAB2D /* Nocilla-dummy.m */; }; - 25364C0863486C882DDDBC76B42C4C3E /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 0381DB03287A652D133655CC87C0F3EC /* NMBStringify.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 270FEEBAE0671C72A82B3CEE2F771E0B /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D2A40F21DB871AF2ED94C5485E0AE82 /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 27832B2605A37241AF9CD554C9ECB6D0 /* LSASIHTTPRequestHook.h in Headers */ = {isa = PBXBuildFile; fileRef = FED3C10BB4D401609B8331544CF4494B /* LSASIHTTPRequestHook.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 28E95AFD51820CD5CF9BB968BAF17DF6 /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 512114DC23E7E8EE7A0AF19D564A8039 /* Timeline.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 23C8DC5C171AAE9554AE980A620CC2DC /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32ED0E935E3BAF4A9A0EAAA12E4A714E /* MatcherProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 23E21A2171D7E7FCA86815403EB7FBB4 /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = EB9EF23597F63D1D36ACFBD943D656E0 /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 23F9469701D519F1496D3030618FD84B /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91E5E7F9E303328A59D8937676173EB4 /* World.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 24B2AFC31898725750519372CFB2350A /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 018AC161D8915DFDD564EFA2273B3987 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 24B569099A40F837596002531AEBBE6C /* Nocilla-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FA98DAF2AF9128FF34FDC07E582BD369 /* Nocilla-dummy.m */; }; + 27832B2605A37241AF9CD554C9ECB6D0 /* LSASIHTTPRequestHook.h in Headers */ = {isa = PBXBuildFile; fileRef = 5905376E12FC20FEFB3E8B533527973E /* LSASIHTTPRequestHook.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 28E95AFD51820CD5CF9BB968BAF17DF6 /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEE40FE58AB05BDC8D2B1C6D94CF6265 /* Timeline.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 2903F9123978AA04E76F86F183FF99A0 /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = B71B6FB2C60F4A4567912243F63DCFCF /* NMBExpectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 291D078FB76A0C70A15A0ED41D435BC8 /* Pods-AstroTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4997DBF40D15DC61455083F9414614A8 /* Pods-AstroTests-dummy.m */; }; - 2BC2F1D0EDC01B4314095492D16E1AC4 /* LSStubRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = EC68F3FFC9D47A8F658D2289435BE266 /* LSStubRequest.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 2DBDF5B701DC699F0E5A0ADCFF7F3E94 /* NSURLRequest+LSHTTPRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A7976230AA3F6FF83457AAFFCC39F987 /* NSURLRequest+LSHTTPRequest.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2DE56E9710CC81260C08A20961ACCE6E /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6190D3DCC555A20AEBF4FE28A41C942 /* AFError.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 2A4BD9C9B0EC5057919893C37FA3A2E4 /* CwlCatchBadInstruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4DC6A3D4868032F66FD8EA387523FD6 /* CwlCatchBadInstruction.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 2B478E2DC2FF40768F6148A43C678C2F /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = BE64E724E8472728D0A669E4678612AB /* XCTestSuite+QuickTestSuiteBuilder.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 2BC2F1D0EDC01B4314095492D16E1AC4 /* LSStubRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = BA36334FABC47EC9CC006D2F1E155290 /* LSStubRequest.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 2DBDF5B701DC699F0E5A0ADCFF7F3E94 /* NSURLRequest+LSHTTPRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A32029E1D904B5B2A1DE1652D056556 /* NSURLRequest+LSHTTPRequest.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2DE56E9710CC81260C08A20961ACCE6E /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = A805BE202B4797337DC796D18209D0D6 /* AFError.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 2F2BACDFAC03C2E7789C205EA7106BB1 /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E5401E977AD5FDBBACE2190887C0E6F /* PostNotification.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 30A99A47BC4031E7C5677314FDBF61A6 /* Pods-Astro-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 01969FDB7BE5215049329E2826518627 /* Pods-Astro-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 30F0DD2AAF62C4A402C220E07E8C6C98 /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F9A86574F2A7071B2058EF9649F9F4F /* AllPass.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 351E7765D3B3ADCA308F5A1844DC6761 /* LSNSURLHook.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F781DA3105FD0D4D698C91B2303DE66 /* LSNSURLHook.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 369F9F7F2F3492C0A2083F156FB1E1D9 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94D3C32D2459BA35E799A27B7A23B1D8 /* RaisesException.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 39E1878913C1AD8669DA18845D2BC218 /* LSRegexMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 546BBA0E106E3A9EF12D5EE0C95B0462 /* LSRegexMatcher.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 3B3B4E109B651C524ECF52AAF1888D93 /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7743BBD05243D52E271CDAD63F5B989A /* SatisfyAnyOf.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 3B4F15B3D4EBB8580874CFA87CAAB437 /* LSDataMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F16FD68893A2ED451E86E1599F8FC16 /* LSDataMatcher.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3B588A1AD8E3D88B70EF1A8D3CF519ED /* LSHTTPRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = B175E85AD5037C0096B0195D51B93034 /* LSHTTPRequest.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3BA67C86ED6B34936485F11775AB6847 /* LSASIHTTPRequestAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 489CA6D4A92715860DCDDFDB61B71884 /* LSASIHTTPRequestAdapter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 3C0916C48CA10162D3762D798BC0B110 /* String+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC674E21556741A41DAFF6F06A257444 /* String+FileName.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 3C380C634D63206648B6D947901FF88D /* NSData+Nocilla.h in Headers */ = {isa = PBXBuildFile; fileRef = 612F5B7DAD9D03A91ED5FC2A20417E03 /* NSData+Nocilla.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3CD7D0CFD42577B550E17FB682EA74F4 /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA005D7A247CDFA9BFAE4F33F1950A4 /* Example.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 3CF89E18D971D0C887BAC515B1955234 /* SwiftTask-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 90458BEF3622BBC8AA13B41F18337D64 /* SwiftTask-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 32A15CB3A67F9D51D3908B632FDB993F /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56456BE95901992704AB3306530F35D9 /* FailureMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 33E5A021D1D2FC44E77FDF3747D1B45E /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFDD470FB1B330C261C9CCC344C15553 /* BeCloseTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 351E7765D3B3ADCA308F5A1844DC6761 /* LSNSURLHook.m in Sources */ = {isa = PBXBuildFile; fileRef = 844AA432B11A38D608D923A582868EAC /* LSNSURLHook.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 3606F73517A2B9A6576399EC135BC780 /* Contain.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC3D6E2DF28C598E7E958A840814A3D1 /* Contain.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 367D40230FBC81C9A1A0DA9D2AB20389 /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B31B1D71EFA9C9F6BC2B28D6ED7A6B8 /* SourceLocation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 39E1878913C1AD8669DA18845D2BC218 /* LSRegexMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = B9EBBC3BFE00D8E205D6DCCC86AC5CEC /* LSRegexMatcher.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 3B4F15B3D4EBB8580874CFA87CAAB437 /* LSDataMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 43E4D1066EB44FB7BBE0C05352348E7F /* LSDataMatcher.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3B588A1AD8E3D88B70EF1A8D3CF519ED /* LSHTTPRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = B7A458E7FC5F0B82EF38CFE791D5F7B5 /* LSHTTPRequest.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3BA67C86ED6B34936485F11775AB6847 /* LSASIHTTPRequestAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 28E7D50C8D217D7E3F2764432E597CF4 /* LSASIHTTPRequestAdapter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 3C0916C48CA10162D3762D798BC0B110 /* String+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C722BFE51DE5EC90209D19ECD8540E1 /* String+FileName.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 3C380C634D63206648B6D947901FF88D /* NSData+Nocilla.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC96004790B5821E65D3741680B3705 /* NSData+Nocilla.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3CD7D0CFD42577B550E17FB682EA74F4 /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35FEDC55395B40D8E6BDE2EA52A6FC36 /* Example.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 3CF89E18D971D0C887BAC515B1955234 /* SwiftTask-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1072D15ED5ADB6DC83CCB4B1AD251A7A /* SwiftTask-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3D8752CE38A3F42C824F6C25BEF128BD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; - 4253F20907FA7DA4F0CF6E404BC9C15B /* NSURLRequest+LSHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 12ADD80150F556C531DE5DA952B00FCF /* NSURLRequest+LSHTTPRequest.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 4339A9964176E715E909554ED062D717 /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80FFBF4F48BE6A503B8C04F7EE392ED1 /* EndWith.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 43FE60867B789DBF20EF2183F9D77EEF /* _RecursiveLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58FC63C8CBFD7E521F24241853DF5C14 /* _RecursiveLock.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 45099B79D9242078EB5C5BA7F6BAD209 /* Contain.swift in Sources */ = {isa = PBXBuildFile; fileRef = C110C237F252435D4A36AFB2FBC9847C /* Contain.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 41DABD9E1F8798C296F3A34472BAB79E /* NimbleEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = B46E099ABF86787632665AD81615741E /* NimbleEnvironment.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 4253F20907FA7DA4F0CF6E404BC9C15B /* NSURLRequest+LSHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 9168F05B875F16FB7DF6C42AF6C11A11 /* NSURLRequest+LSHTTPRequest.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 425986BA8FA89A5F4844188220E86B94 /* NMBObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00F11A8B3CAF699F2B925AA442CC06D8 /* NMBObjCMatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 43FE60867B789DBF20EF2183F9D77EEF /* _RecursiveLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0DD19770937AA27811F726BE7FBCEF8 /* _RecursiveLock.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 459308E67D997C1EC1520EF78156E5CA /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271683EE071FE4B5A83D3567AC06B69E /* BeAnInstanceOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 45BCC8353C03B9B33DAF1A48F7EF1CD5 /* LayoutLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE458D803D42A46517B26B09327987D1 /* LayoutLabel.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 4846BC919D685D1A6927C22B319BF5BB /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = A651FAABB8A4D3C1B0C9EF7C6EEFE8BC /* AssertionRecorder.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 4B0FACF86699832CB060706698EEDA62 /* LSRegexMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 94914DECE29A7AF99992E91B0D97AA9B /* LSRegexMatcher.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4FF8A2C2644173400B8E4CC7BE4D6D77 /* LSHTTPRequestDSLRepresentation.m in Sources */ = {isa = PBXBuildFile; fileRef = F2EED208FA3C8DC3E0FF81F145DF3C84 /* LSHTTPRequestDSLRepresentation.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 517677321A634907F92B81A1B04EE27C /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADED1DCB14A4876F2717EF125915C71C /* Response.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 51F46241DBFA48BE6840E89B60B5C761 /* LSNocilla.m in Sources */ = {isa = PBXBuildFile; fileRef = 5022140F377B8260DCB428BF0F20E52C /* LSNocilla.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 52695B80D42DFB4C48D7A906478509EB /* ASIHTTPRequestStub.h in Headers */ = {isa = PBXBuildFile; fileRef = 071801FD957F89FDFD4A42FA1CE52621 /* ASIHTTPRequestStub.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 47FF3675B40FB878EEDDF260B563A917 /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F8463461A3040238873251F0DA89F51 /* BeIdenticalTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 496E8B1CE48B7D5600206CBE612A0753 /* World+DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 02F144FF0E29EE422B0A2B133E88D247 /* World+DSL.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4B0FACF86699832CB060706698EEDA62 /* LSRegexMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 8478128CE80F1923F00F7ABB963445E3 /* LSRegexMatcher.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4ED4AAD00C029EC91DCDF87F21999BCA /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91A97C22294E683A3DB0ECF3D78A2EEE /* AssertionDispatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 4FD7C35D72F219E04DF522D30813FCCA /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DFF530B8460BE93B736F122B6826654 /* NMBStringify.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 4FF8A2C2644173400B8E4CC7BE4D6D77 /* LSHTTPRequestDSLRepresentation.m in Sources */ = {isa = PBXBuildFile; fileRef = 5796F3D38D4CC0C747870F1199E04C95 /* LSHTTPRequestDSLRepresentation.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 517677321A634907F92B81A1B04EE27C /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5214EA8CA0429CA4A308C2FC112F5541 /* Response.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 517F93419A9ADECFE89F7E72A01AF61F /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FBE565E9FFFBC9F4BFA295826DEE17F /* Stringers.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 51F46241DBFA48BE6840E89B60B5C761 /* LSNocilla.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C073BEEC136249637E22B7C6F9413C4 /* LSNocilla.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 52695B80D42DFB4C48D7A906478509EB /* ASIHTTPRequestStub.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C172C4ABEF73E6346779462EF99A24E /* ASIHTTPRequestStub.h */; settings = {ATTRIBUTES = (Project, ); }; }; 540A9D15A35FC96C9836AFE59201DD8C /* Route.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F5F08345597F020F21A5AD51E29EE4D /* Route.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 5546B5D9DA48D039B6AA3267D7B6EAE5 /* LSHTTPRequestDiff.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D6F8C4B96CC18FA8D2EB43CFD0EF551 /* LSHTTPRequestDiff.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 55E2DC8C6E93D6A0A34C31686200ADA5 /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C2C94ED0D97068FC1CCAFB424107CBF /* BeginWith.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 589210F372BC6A8D77D483BD1540D849 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51D68EE622CCBC2517A7E3842815620D /* ServerTrustPolicy.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 59BF94BC2C9C7AEBF10547516224E504 /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396035A274BE85E2A79A14557F188DE9 /* AsyncMatcherWrapper.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 5C50D4DC86334599B9967449D88C8449 /* LSDataMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B9BB65FFA5699B6F2A3494430B04909 /* LSDataMatcher.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 5D344495D94126F483F7FC0947959CAC /* Freddy-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2511DF7B5065EB4197A4B475803F14 /* Freddy-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5D90870C3016C64BE441B6731D4FA960 /* JSONParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49C52E23E4263893DB7947504A16DF2C /* JSONParser.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 5546B5D9DA48D039B6AA3267D7B6EAE5 /* LSHTTPRequestDiff.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D732738D87FBCCD8CAD7BDE2BC93D3C /* LSHTTPRequestDiff.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 55A129D5A66A5622588694DA64560914 /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B74629F50D82A8DC2A0634DF371A060 /* Equal.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 56F7DD49AA4DFB9478DCA32886828B21 /* World.h in Headers */ = {isa = PBXBuildFile; fileRef = 420F4BAB4F683D03FBFA5AD7938B9AD1 /* World.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 589210F372BC6A8D77D483BD1540D849 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3E59DBAF321B8E878736D0330A69667 /* ServerTrustPolicy.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 59C95DA75C1882A696E21A1835504425 /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63CAF6B422DA057CB9D7B2F771C5C1DD /* MatchError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 5A36DA20C0A5E5C24E774C91151D7B4A /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5470804D3E23BD6A0573E0A40894EDB2 /* AllPass.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 5C50D4DC86334599B9967449D88C8449 /* LSDataMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = CC067C5632AC878871B27F417FA420DA /* LSDataMatcher.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 5D344495D94126F483F7FC0947959CAC /* Freddy-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E87CE6D3EE2DEDD47199194199203F0 /* Freddy-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5D90870C3016C64BE441B6731D4FA960 /* JSONParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA00E816D001F040DB4584D509447162 /* JSONParser.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 5E532421F8D123918FC5A9EEBAA516E7 /* NetworkServiceLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = E408DAA6184E7EAB179A403F5D1274DA /* NetworkServiceLogger.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 5FD768C424450A19511BA433803546B7 /* World+DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 9012B52BD1D693879482A5B36C189E9A /* World+DSL.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 618631F3121DDE6420DB7A834BE996D6 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFDC167F51D907DA3C0BB648440C27F7 /* DSL.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 618631F3121DDE6420DB7A834BE996D6 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = D26AD7AD03D34A166AAEF84BAA2C99FF /* DSL.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 62DEC5F0616CD40D23EDEAB17CF39423 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAAEEE8218279060AA70291E98351EEA /* RaisesException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 6316792FA4B2C39F6E00413B7CC7DCC2 /* UITableView+AstroGadgets.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1BECFF57B794BF840211E16075E843B /* UITableView+AstroGadgets.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 63F83D6FFDA4A20864206D5CA7507315 /* NSString+QCKSelectorName.h in Headers */ = {isa = PBXBuildFile; fileRef = BA18B1B763EDA6EBEFF2B9002A0B4538 /* NSString+QCKSelectorName.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 683D42CCDBA04DEAA5927130555865FB /* LSStringMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = F1A19438A8C71AB3785FC2728ACF7D35 /* LSStringMatcher.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 68DEA79938C67989D4B1DAE9A477CC34 /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C12E2AC29BB461B5CA36A55A98309C9 /* QuickConfiguration.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 672B368FFAEC560683DAE200D4403F6A /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76F8FAE11BD3A5684FA3B42290AE2A65 /* BeNil.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 6735BCF216A4D6B335F84162272697D8 /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 5348EC8A28239000A63C8FF4239D4DE6 /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 683D42CCDBA04DEAA5927130555865FB /* LSStringMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 935805BA03F9777174A970A23B24FC18 /* LSStringMatcher.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 68AFFBAB1E604C6F3E73CD9A6F1E00AD /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1F9F41C0A5BDC42B5117C8F48D1D49D /* EndWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 698E9878CE282958D0376C869C410215 /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F6BE2A247593D064F2152B0CA22C31C /* BeAKindOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 69BB92468361D788FD8E866A0997194C /* ReusableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 877BF995E72F2E8878B207A8C0E9D3D3 /* ReusableView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 6AAD3EF28C1C2DA026B93AD8D814F64D /* Nocilla-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8E32FEBF48A8DF57EF672939A794ED19 /* Nocilla-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6A039692C114B65A2C720B45DCEA9CC3 /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20727403B4316E9CEFC328D40F06026 /* BeLogical.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 6AAD3EF28C1C2DA026B93AD8D814F64D /* Nocilla-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E69B476F4410F0F29153127554FEB86D /* Nocilla-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6E34C836D8E7066A01CE21FFE17C35C7 /* Freddy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41D136DE7AD7FCE83428ECEF04EDC1F7 /* Freddy.framework */; }; - 6F0D2A0EB1839F6661685B993584676F /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A355A0E9474F123020DFB6D08415B7E /* World+DSL.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 6F22E6AD6E840224D60B79003945E74D /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17937D695835B2FAFA87680EBD2DDEEB /* Expression.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 6F9AC619478339681794CFB2FFF49EA3 /* LSStubRequestDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = D599F054E4FE2159DEF282CBE0E31DFA /* LSStubRequestDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7070E1BDFFD9D6D40C6ED465BD5C58CB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; - 707C7BA834D3573C883AE24BEEC1BBC3 /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = D5663CF2A9C80609B52068DAB5F86C8E /* QCKDSL.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 71190327DD1ABA3B8168BA3C5899C384 /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AD11791D91B1E8BE6A15A123CCD5ABB /* JSON.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 719B7010C936E7C78C61110452A3B33C /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7F5275B4193E841C3997C48E6EFE373 /* BeAKindOf.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 6F0D2A0EB1839F6661685B993584676F /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9066EF1FF0D9159E9833580D771FB0A4 /* World+DSL.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 6F9AC619478339681794CFB2FFF49EA3 /* LSStubRequestDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 99BDD588C72B35D7B24CAEC29C01E27B /* LSStubRequestDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6FC0B2AA820185C97CD0B5CFAA6BF839 /* CwlCatchException.m in Sources */ = {isa = PBXBuildFile; fileRef = A130D5679AA613D87BFA285866504038 /* CwlCatchException.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 71190327DD1ABA3B8168BA3C5899C384 /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43AFF0AF2C6A3B6953AA60F44B6C74E5 /* JSON.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 71E52833B614749DD58941AB12CDFBBB /* Pods-Astro-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FC4B28D110AB0D170E2F97D415B8E6E9 /* Pods-Astro-dummy.m */; }; - 73C671D884BB1EBC50D22264C30ACBF0 /* LSNSURLSessionHook.m in Sources */ = {isa = PBXBuildFile; fileRef = BC2FBAEA7B0E5E601D62EF9567B9A1D3 /* LSNSURLSessionHook.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 746762DD022722AA0783532E872ACCC0 /* LSHTTPBody.h in Headers */ = {isa = PBXBuildFile; fileRef = 1053740C7A0A2C8875D945447E55AF4E /* LSHTTPBody.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 74A3FAE2302123E379CA7F5EEB2AD19A /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1E3046BF9FB565B47238131ADA779CE /* Equal.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 7543CC2ADC0CD764A090380B14E8A1B4 /* NimbleXCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0D3979768B49843A07A2D912E671C1B /* NimbleXCTestHandler.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 774564E76F45CEBD01B57E27B3336BFD /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57F88C7E49227690DB30C290A9CEADBF /* SourceLocation.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 781A3371065498563238D5E4E7F7BC49 /* LSStubResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 9108B9F77C510C7B00290542C62100BA /* LSStubResponse.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 7A3FEC3C8303482043DB7C0A6184BF08 /* ASIHTTPRequestStub.m in Sources */ = {isa = PBXBuildFile; fileRef = 12C64E971D6125A9DD3C66125BC78175 /* ASIHTTPRequestStub.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 73C671D884BB1EBC50D22264C30ACBF0 /* LSNSURLSessionHook.m in Sources */ = {isa = PBXBuildFile; fileRef = 726AD99F23F018BA941D0453A5334B41 /* LSNSURLSessionHook.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 746762DD022722AA0783532E872ACCC0 /* LSHTTPBody.h in Headers */ = {isa = PBXBuildFile; fileRef = E2416C6003EDE2F2F23F9A0A29A2C9C7 /* LSHTTPBody.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 781A3371065498563238D5E4E7F7BC49 /* LSStubResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 091BC8190E80590146A6EFB11A4B99F9 /* LSStubResponse.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 789884544BCB14A5AE5BDDF060BF5A4D /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C342B64CF1A402B544FB9BD9506DCDFC /* Expectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 7A3FEC3C8303482043DB7C0A6184BF08 /* ASIHTTPRequestStub.m in Sources */ = {isa = PBXBuildFile; fileRef = FB36CE291992844FE7A45419C0548A38 /* ASIHTTPRequestStub.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 7B58011958B21BE947D3AB53CC88EAEC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; - 7BB2B96575CFE48BF2A8813B03DA4068 /* Freddy-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BFC88CB4D2A5E653FE76097D9DCAEA4B /* Freddy-dummy.m */; }; - 7BE489F32BE286EB24CA28BEE8FCA4FE /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D6F35F873EE68AC1B849C53C8377143 /* NSBundle+CurrentTestBundle.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 7D635AC46655BFC2E195DF3B10284A36 /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 53A987C36D5AF811928370956EDA6F7B /* DSL.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 7DB5BAB83F6D611D2518C7219D18B16F /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 846E1484C4DB60242A6128EEC54F4CB4 /* SessionManager.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 7BA64FD52F88EB9BF55FCD294A9A29C3 /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = B618E80C0317B46EAFE31CB0A2C1EA34 /* SatisfyAnyOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 7BB2B96575CFE48BF2A8813B03DA4068 /* Freddy-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 419F563941A11F843C9901ABDD72EFD1 /* Freddy-dummy.m */; }; + 7BE489F32BE286EB24CA28BEE8FCA4FE /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA81FEE04491C2D883B23DA893F051F5 /* NSBundle+CurrentTestBundle.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 7D608B1CFBCC2A5E0812EAAD4B307921 /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = 395D8F5906B8920E261C2EB3D176D9F5 /* DSL+Wait.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 7DB5BAB83F6D611D2518C7219D18B16F /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3027BB7BD21015332138DF472C6E59 /* SessionManager.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 7F88BF11FA9A34E488A69DEA8D3474B1 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF14E7E64D23B07812BAF0C10D193605 /* Alamofire.framework */; }; - 7FD79232CED05EBA71CC5800B233A875 /* JSONSerializing.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF1351BCB4B31A4D1E8A625409BDF310 /* JSONSerializing.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 7FD71384CF4A7526AC5049B5F3C6D84F /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 06D5EF8B45FE60AC6EDAC8FCAEACD8DE /* QuickSpec.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 7FD79232CED05EBA71CC5800B233A875 /* JSONSerializing.swift in Sources */ = {isa = PBXBuildFile; fileRef = F20DA91294939D19DFFEB163CA13864F /* JSONSerializing.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 8053AC82A10A2BBFC110A74C0BD55CF6 /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72A14CE0AF1C91349D552E053714D575 /* Match.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; 80C451D6026B1C2BF6EF917B4F5BF98B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; - 80EA474E7F3BF83093D617F1D7B13693 /* JSONParsing.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3D5F8E522B317FBBEBB08F1E2BF775F /* JSONParsing.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 81755C0A977CEA435BBCCD2C7E6DF8FE /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2B3E7999D62C38A0ADE7FC63494B885 /* SuiteHooks.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 817C1ED23C18514E67277900D668B028 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24AB3FEDC733FF0C724BA4579F65C1CB /* Notifications.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 82122FF76AB199158E5EF889C4E0DC2A /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FD76D017AEEF056A8FC7A05D8562C2D /* XCTestSuite+QuickTestSuiteBuilder.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 8335A65095F73165ACB070AA3BE0973D /* World.h in Headers */ = {isa = PBXBuildFile; fileRef = 550E4A859435509BAB6638D3E05ED846 /* World.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 84CFEA055A12E312DA45E1AB5C64306D /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = 377FF62898B9F233DAEAC2A03F7ED71F /* ExampleMetadata.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 866830C585216CA87A15D078A28C410A /* CurrentTestCaseTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = DD52F0E3E4688A2CE0A07E04DA911577 /* CurrentTestCaseTracker.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 8679D94B1C5A51B76CE4064A36FD2F07 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B831039D667484298E44CC97352C424 /* MatcherFunc.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 88A36E7B64F0A565C806F29E83FF0B4F /* Nimble-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 52371319E2C73E2815BF88ED9A42E25F /* Nimble-dummy.m */; }; - 8927C37DD5750B9F6409C3EA80623A16 /* NSURLRequest+DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E5570E2270E74080439F093AE77AF01 /* NSURLRequest+DSL.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 80EA474E7F3BF83093D617F1D7B13693 /* JSONParsing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87E9235E6C56C463B43776700465412C /* JSONParsing.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 80EB3F3AD608D1B132A3EA4B3E28CAB1 /* mach_excServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8C9D6D0877962CE530ECA8A5744423CC /* mach_excServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 81755C0A977CEA435BBCCD2C7E6DF8FE /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 858F7DFCEF515415D21993DCCA024EBD /* SuiteHooks.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 817C1ED23C18514E67277900D668B028 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45E2CDCB48C2960B6288675AF1FF0E5B /* Notifications.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 823913707A4CA8384A5AC01C741E5750 /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22810EF07F547FE210012C8D3998B21B /* AsyncMatcherWrapper.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 82E4932F032610E1D1D444C437E6CF5B /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE714AFA22BCF167146806EF12350E3 /* Errors.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 836D605A24E47908D3B42785036E4615 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3965EDA5B84885B983B84B60B4DCE10 /* DSL.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 84CFEA055A12E312DA45E1AB5C64306D /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = B84F0A54CD61C8443E73C338B3CBAD10 /* ExampleMetadata.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 8927C37DD5750B9F6409C3EA80623A16 /* NSURLRequest+DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 434DF22B7BBC30B5E3870DEA54191263 /* NSURLRequest+DSL.h */; settings = {ATTRIBUTES = (Project, ); }; }; 8930AA77E598E0DB79F1376627A2BFE1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; - 898EA2E37F5E43EAAAF3CE85E3E58855 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E02FD2E676BD9EBE51D94DD72A393CA /* MatcherProtocols.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 89C4DF92D207FE3E5AA480B967699CBE /* NMBObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6496FB4F8515747A0F9E50DC22B36E11 /* NMBObjCMatcher.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 8AC936C1872CED091BEDD5BBB43FBE3E /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B337EA4DB32DBBF01A45AD2DA159EEB /* Async.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 8BC79A9A7061C7E12A864E19C6928038 /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981C0D8B96C81FA46A629CACA3982AD6 /* BeNil.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 8E1F57D1096BDAA008D4D0EFEEBCB284 /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AB54E1DE71B88A7C5744C4262CC89A2 /* SessionDelegate.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 89AD78E4074EB23249969F39D82E8C28 /* CwlCatchBadInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 042869A08CF3409EC2730F95F519A0F2 /* CwlCatchBadInstruction.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8C3B3F069A44B45658619C499E551214 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F449AE0F19985F86FE24F5498131DD7 /* Functional.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 8E1F57D1096BDAA008D4D0EFEEBCB284 /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 482DF7435CAE0FA6405497EC0EF2D288 /* SessionDelegate.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 8E6F6C967E8A0D0F0E0CB1383BE70BCE /* UIViewController+AstroGadgets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25D7A7C2951F50118DCBAC7528F922D9 /* UIViewController+AstroGadgets.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 8FDE9405A930F8277771A142D150C660 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 213513F3A16D2DF21DBB9B616F107E33 /* Functional.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 90D8EB6C28E1D64FE32D9A66EFFC23C5 /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FF542340635F5EE3FFBD29F13A8B80E /* BeLessThanOrEqual.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 91C09AC2A52ED69A27C8D923139A006F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; - 939557CC5200D195ED671322163AF7B2 /* JSONLiteralConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = E19A03D34F45F64F617E816C9EFB0D92 /* JSONLiteralConvertible.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 9469DF81ECB494E84675969B5E13374C /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 99B26536B75CF50E75382CF77F5F68B4 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 963E33529852F9EFB574D6160CDDE7D6 /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 0173D589AE58B242AF1C54C7B7C4A174 /* QuickSpec.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 98448E68F706C3077F402B1F1B64520E /* NSData+Matcheable.h in Headers */ = {isa = PBXBuildFile; fileRef = 04ABE7FAC5DD55B63509FCD2B4FC184E /* NSData+Matcheable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9B078190829C71BDE57F32CA21580BF0 /* LSHTTPStubURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E54E0A32D638DABAAE1938E085649F5 /* LSHTTPStubURLProtocol.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 9BFC09FB900963AF0813771CE5858CFB /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2C900ACA8C6D4A9FD8AC095F0B30764 /* Errors.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 9C9F50D58E6F3B5AA5F58598ED7F561C /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16A97930F8C7CD98BB75727908A6CEEF /* Result.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 9D4229388B9B2081A1D461BD753C12AF /* Freddy.h in Headers */ = {isa = PBXBuildFile; fileRef = F952371ED40FD33BA4B9D7AE9F6420AF /* Freddy.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9F37AC5BEC60E4932EDCC5DD0E05E33A /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEE475B600741EFE0262B7D1DCC75083 /* MatchError.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 9FC466460AAC0031C09C37F09A3DF032 /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CDCD82A818E6E82200A01860040B5C7 /* BeGreaterThan.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - A1F69DD3961B60955EFD28E2BDF446E8 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = 4029957B3F8655025D5D20920ED34752 /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A3ACA641503E24BD47E8AF10D4907A39 /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DA20E139146E66B853599325D0EB814 /* BeIdenticalTo.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - A434C8CB0F23A35DA222105C7B11300D /* LSHTTPRequestDiff.h in Headers */ = {isa = PBXBuildFile; fileRef = 73C18D240C638526F78D36934DAA00DC /* LSHTTPRequestDiff.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A460983620B3719092C5217CCC57A699 /* LSHTTPRequestDSLRepresentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 75B4742BC7EE5F35B53FF4C55C5E6B64 /* LSHTTPRequestDSLRepresentation.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A47EF77A104A17550B47ECB220523317 /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = DA2117C0F3C548AD5CC636A142BE9CD6 /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A49866E583A9E617BA24334FBF8BF658 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305F507D0BC868E0EFA0E492C50BB344 /* ExampleHooks.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - A63164B84A22C7E0FDF3A30121CEE861 /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E35D5AB5C88B5BA0D575B5E6440C639 /* BeGreaterThanOrEqualTo.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - A6A54F64F620A12FB4845FAA238206A7 /* NSData+Nocilla.m in Sources */ = {isa = PBXBuildFile; fileRef = 26497E5736035420A6E2C4002BFCA9B2 /* NSData+Nocilla.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - AA6C0D448D1C9BFB4CBA1C3D1C8831D4 /* _Atomic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78D81935F9929A6DFE89C95A30163613 /* _Atomic.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - AC3B78B98A81CCCA230DA7A0BC4F10B1 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03C4A91411BA8D06FCB83DB7EB88B2D9 /* Filter.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - AC7E5AC1841D836761B4154BE0B43D29 /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AC20E208201C4090E34097C86AA98A7 /* Expectation.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - AE04A2A6667D3A3ECAF7599774E0176A /* SwiftTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81B287AAADD69D3417422AE070927E44 /* SwiftTask.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - AE48DED43213E899DE5D21D14C7369AE /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BEAFEE666D85EA288AF1A32B5F69FAF /* ErrorUtility.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - B0BD13A01F667B129F4F5F167088A024 /* Nocilla.h in Headers */ = {isa = PBXBuildFile; fileRef = CDF5736D9D7A92F8E27A62AEF194A5D3 /* Nocilla.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B30D380B5EFCD54FEE04D3C4F1988262 /* NSString+Nocilla.h in Headers */ = {isa = PBXBuildFile; fileRef = D057E3DA74D706A5230C38A2A8DA23BA /* NSString+Nocilla.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B37592A64C36F09413FA486F83F789F0 /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = F313245E710FF08DD42E94F62560C21A /* QuickSelectedTestSuiteBuilder.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - B44CA6989B931C025C7BB2B9F5CEB4D6 /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C829808D86197B50D8483528E538747 /* BeLessThan.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 9240F19D758891B8DE78FFF411417854 /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E74F02D3DD6557902CB407979D25D981 /* AssertionRecorder.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 924743723501046E72C2A51432208BDC /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D7294E535E0AFFE83168F74C8237CE8 /* QCKDSL.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 939557CC5200D195ED671322163AF7B2 /* JSONLiteralConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16D6F9AEC686EC3BBF1F9BA7D43A92B6 /* JSONLiteralConvertible.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 9469DF81ECB494E84675969B5E13374C /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E949E5FAFED6D1CEB3FE99EABFDD821F /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95A8A7B8395A05E80009C910722872E2 /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = A64BFECD5EC18D2866C2666DFE114488 /* HaveCount.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 98448E68F706C3077F402B1F1B64520E /* NSData+Matcheable.h in Headers */ = {isa = PBXBuildFile; fileRef = 96F9B4222FCE15BC3CCD555BF892815B /* NSData+Matcheable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9ABB68606EE3A3BC42DF42A46BC8CEBC /* Nimble-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B169EB60F7FD48C11D3AB64B0F370D05 /* Nimble-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9B078190829C71BDE57F32CA21580BF0 /* LSHTTPStubURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 775A5957C73D966C589B5CF833ED9265 /* LSHTTPStubURLProtocol.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 9BAE4301475AA7A9B99292815CC0FF9A /* NSString+QCKSelectorName.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B1FD22744524331F663AF17391C873 /* NSString+QCKSelectorName.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9C9F50D58E6F3B5AA5F58598ED7F561C /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE96C0A3E3CE37F13CC60F1580997A77 /* Result.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 9D4229388B9B2081A1D461BD753C12AF /* Freddy.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F0CC0D1DAD2512CFF1D6CFEC24AF43 /* Freddy.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9E20125005339D1ADAC2362C7E5C4A2A /* Nimble-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 35FEFFE81F749A3E4CB385C880B7BCD1 /* Nimble-dummy.m */; }; + A434C8CB0F23A35DA222105C7B11300D /* LSHTTPRequestDiff.h in Headers */ = {isa = PBXBuildFile; fileRef = F35887722351255C405176EC37414175 /* LSHTTPRequestDiff.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A44194C2C4B01E71AA0B6D21FEFBE284 /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41B13CF9F52B5FF0B725DD6AA4D6315F /* ThrowError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + A460983620B3719092C5217CCC57A699 /* LSHTTPRequestDSLRepresentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BFAAD6E4119D80CD951A46889C39FF3 /* LSHTTPRequestDSLRepresentation.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A49866E583A9E617BA24334FBF8BF658 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38704C04F766AD087FAC725691D3AE02 /* ExampleHooks.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + A5B81BFE65BE23BC6DC8D52BF2CF752D /* NSString+QCKSelectorName.m in Sources */ = {isa = PBXBuildFile; fileRef = 071EF70F48ED17641B729D4449E52994 /* NSString+QCKSelectorName.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + A6A54F64F620A12FB4845FAA238206A7 /* NSData+Nocilla.m in Sources */ = {isa = PBXBuildFile; fileRef = FC9D596C715B462C4CC0DDEDD2CEAFE7 /* NSData+Nocilla.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + AA6C0D448D1C9BFB4CBA1C3D1C8831D4 /* _Atomic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 780A2D1F0CF49C25B2CB9CC25C6A5B94 /* _Atomic.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + AC3B78B98A81CCCA230DA7A0BC4F10B1 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56262CD3940BBF6860630568948BAE7C /* Filter.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + AC4D459FD118FCA91F663E44A9190A0D /* CwlBadInstructionException.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAC316631C30B0FD1B176F02682F6F97 /* CwlBadInstructionException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + AE04A2A6667D3A3ECAF7599774E0176A /* SwiftTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED3851D99ECE4294DBA48BEB676603C6 /* SwiftTask.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + AE48DED43213E899DE5D21D14C7369AE /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0B1FD987CBECCD1D237C22E2CB5A489 /* ErrorUtility.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + AE50FD298CA1A9EDB17B82E997880C44 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23E606DCE7B953825CBCE1A0382D13D8 /* MatcherFunc.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + AF7584BF6AAFB26AA1E7B93988786C14 /* ThrowAssertion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22C9025EE20B48DF9D5171FD0DF74CC9 /* ThrowAssertion.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + B0BD13A01F667B129F4F5F167088A024 /* Nocilla.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F253C050EA740DAB7F27AEC93703F14 /* Nocilla.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B12603C6B3285F1836F3DEE349EC980B /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = BF797701B06C20F46271081DE11606C9 /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B2439A2037E6D944D1217FF2C1A12B3C /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = F04ACF71FF4069A167FB9CE9E04FCB80 /* BeGreaterThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + B30D380B5EFCD54FEE04D3C4F1988262 /* NSString+Nocilla.h in Headers */ = {isa = PBXBuildFile; fileRef = DD0599BF41155E9A21C6829AADA12EEB /* NSString+Nocilla.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B339B5B84857480DF2F5A8C9D5A7B410 /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6935ECADFECDEBD203811BF6D9285D30 /* BeLessThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + B37592A64C36F09413FA486F83F789F0 /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82B61462E1D7A388F9EBB284336FEEF4 /* QuickSelectedTestSuiteBuilder.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; B4545BA7D7D3C52247DAD0E39B5E8D5F /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB517BF9DAFFCA1BBCC5A0BBCB5B1A73 /* Queue.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - B47F2B1F7F5FEC4CE62F09832392E842 /* Nimble-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8499C88CD54A0B131F08D126D46C7B9E /* Nimble-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B4907351FF7E7AEEAC1F6DADB3ABED1F /* NSURLRequest+DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = BA6AF301972A52D836E479EF9F1FF7C6 /* NSURLRequest+DSL.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - B5A729292D4E2991D08C94D2E961DC29 /* JSONDecodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 368ABCA024EEAE1AF88A306FFE3B6E86 /* JSONDecodable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - B7B6C386D18C61D236CE7B92C62DC4F4 /* LSHTTPResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 34E7DEA475E58F139AD7A9775C450E8F /* LSHTTPResponse.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B7BAA1610C192270DE28D6F9ACE95542 /* LSStubResponseDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 77F6A5367DD6585F38FE4EAE6E016F14 /* LSStubResponseDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B8C5A113F98D10AE527D439BD26EE33F /* LSStubResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 419B8EC230B0AF8A2877C52EDD18C518 /* LSStubResponse.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - BAB651A8F623A6E827FC716A62B9F74D /* LSStringMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = F63BB0F4518DCE933B9046B940D5A9B1 /* LSStringMatcher.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - BDDBBC50E7CFA0438AD014013745029F /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21295EB820534EBAAEB5834DBCE02CC8 /* ExampleGroup.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - BE3B29F8DC00244F423717A62D73A7AC /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = 964D61122C046B2ED058B18F3E45CD99 /* BeLogical.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - BF25DD2EB63D29FFA2369A4D3DEB6974 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = D478996036C1B8667C7EC683C038F598 /* ResponseSerialization.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + B4907351FF7E7AEEAC1F6DADB3ABED1F /* NSURLRequest+DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 8185CCDB3E4BA12414F4A69C31333C1C /* NSURLRequest+DSL.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + B59A07EFC0D945B773AE51D42C68BD6E /* CwlCatchException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E4587E29B77DDD65EF49A919532617 /* CwlCatchException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + B5A729292D4E2991D08C94D2E961DC29 /* JSONDecodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5B95EAF8208ADAA52D67BEC321D0DB9 /* JSONDecodable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + B7B6C386D18C61D236CE7B92C62DC4F4 /* LSHTTPResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = E01777C7EE471B814CD8F813DBBF0851 /* LSHTTPResponse.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B7BAA1610C192270DE28D6F9ACE95542 /* LSStubResponseDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 22E228A44F7AEFB0BDEFF1D782F9A348 /* LSStubResponseDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B8C5A113F98D10AE527D439BD26EE33F /* LSStubResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = D0A6D3A428910ACA352AD000575EDC3B /* LSStubResponse.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + BAB651A8F623A6E827FC716A62B9F74D /* LSStringMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D3CCB37118665EF74FAD3EFBF9A833B /* LSStringMatcher.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + BB08049325259E02F3290F3D03845EF4 /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE24FB2E57BA499D070F376E45F23F78 /* BeGreaterThanOrEqualTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + BDDBBC50E7CFA0438AD014013745029F /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9683F7A2924A38D8737ACA6CEC0E4F9 /* ExampleGroup.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + BE0567510EAD2D0480CC65FD033F43B0 /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = D84F37F392EA7B0DB03AE43334470407 /* BeginWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + BF25DD2EB63D29FFA2369A4D3DEB6974 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8F61D5FC86AB2B111B34109004B6577 /* ResponseSerialization.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + C07BD9323A29CD806C67902E526FE90E /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE475D46AB0F0A2A238288992D520379 /* AdapterProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; C0E5761D5C684C0B64BF30671EE532AD /* NetworkService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D62BB50E8E9E3730D17977D8D21E7D3E /* NetworkService.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; C10D511DA9B280D88FBA356D13F94B6D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; - C1F5A2A34221F5EB192F4D5C1D1A932A /* JSONEncodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5633C1C5B848893399B6AAF45417707 /* JSONEncodable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - C29FA5992EF67D6893321BDDC131C54C /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FA8866188D58E727285A4F69385A638 /* Alamofire-dummy.m */; }; - C2BF15D99BFF62CB041E6AA875DA501F /* JSONEncodingDetector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C47C4F0D9B36F88D240C445B404CA9A /* JSONEncodingDetector.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - C375CF1D80C1EDAF7A59CF55A204A1EA /* LSASIHTTPRequestHook.m in Sources */ = {isa = PBXBuildFile; fileRef = 13982F321AEFE4FC8A435F23B9E0B951 /* LSASIHTTPRequestHook.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + C1F5A2A34221F5EB192F4D5C1D1A932A /* JSONEncodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19AD8BD7C876614E7500B225BFEDEA4D /* JSONEncodable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + C29FA5992EF67D6893321BDDC131C54C /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CD687773372933FE0C29624852008F2 /* Alamofire-dummy.m */; }; + C2BF15D99BFF62CB041E6AA875DA501F /* JSONEncodingDetector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9409D21AB7BE75015C900DAF2455EF17 /* JSONEncodingDetector.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + C375CF1D80C1EDAF7A59CF55A204A1EA /* LSASIHTTPRequestHook.m in Sources */ = {isa = PBXBuildFile; fileRef = FC4ED934BA3A8419AC4EF8C3C1E71579 /* LSASIHTTPRequestHook.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; C3ECA19252054094471F35AE516C0C30 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; - C4F4C8EF4A764C0FDEB5789F9207FFF2 /* LSNSURLHook.h in Headers */ = {isa = PBXBuildFile; fileRef = 5990DDE7DB7FAD5BF27CAC2D99935E28 /* LSNSURLHook.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C8A640AC4989B36283DB3E0CE1CB1ADD /* Cancellable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1ED1CA7206A0394D9BE404F9CFCD177D /* Cancellable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - C908B67E55D22EF3E34AB19171FFC0A0 /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 75556B87747C12614320AAF5CB884BEF /* NMBExceptionCapture.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - C964261AAFC1EA02B9305022B88C398A /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1D362BF523A9A5F5597677017D9479B /* Closures.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - CA00C21F8A03E237E579CD6DA42B0DF0 /* LSMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = B4AF807EB366D473D7D2C7B4CAED09FC /* LSMatcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CA303CF6D30D41F05C81DF35576B6C34 /* LSMatcheable.h in Headers */ = {isa = PBXBuildFile; fileRef = 82B9AF145DEC704D066D60237E7CBDBB /* LSMatcheable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CB4924760FF11BC55A5545D970CD9233 /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = BECF439ED63F91CEA1E08C23AAE18336 /* PostNotification.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - CCDFB6611155BB0F4831F06A1A8E63C2 /* NSString+Matcheable.m in Sources */ = {isa = PBXBuildFile; fileRef = EEF30250E18C7F3BC7A5DC0599B4CC6B /* NSString+Matcheable.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - CDC8E7BC4F6D7941783CA1669F3AEC18 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 475A05A4D234AEB496174CD3ECE69914 /* NetworkReachabilityManager.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - D026942696BBAE215298038689DF4952 /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = B789B85D4CF17532F49A10E9C5F8D9EC /* Callsite.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - D0EEF6529F24EF7C1EABEF919A3B1D2F /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF8967CDBD8BA88C5396C98EDDE31851 /* BeAnInstanceOf.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - D1FF865FECBBEC7089ACA994F1C0AA48 /* LSStubRequestDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 5005FBED4883E5ECB521DFF686AF8E4E /* LSStubRequestDSL.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - D2B3B8A5532F9F084D2855970798CB82 /* LSHTTPClientHook.h in Headers */ = {isa = PBXBuildFile; fileRef = D39098627F8A63B173221DD4453E1816 /* LSHTTPClientHook.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D7684539AFE9926F12A51A1DBBDEDAD8 /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A2033086B25E850845B6A7EF6B59A56 /* DSL+Wait.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - D7A646B09D05BD9423A1629EC6CC662B /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 054E3AE9685647513F4760BCC648C0FA /* HooksPhase.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + C4F4C8EF4A764C0FDEB5789F9207FFF2 /* LSNSURLHook.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D101D9221BD3C7FD10D7FC56D4D0259 /* LSNSURLHook.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C54F106227C23A6344BB4B5F72071E68 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09C8AE3C7337CCBD768F964F383CBC0D /* Expression.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + C7B4B368446BE295364BC8EFAF217263 /* NimbleXCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD0FBEC03BBB6081E42A69AA43A022AB /* NimbleXCTestHandler.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + C8A640AC4989B36283DB3E0CE1CB1ADD /* Cancellable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C47E51BAB892EFC84CCBF988BD7503 /* Cancellable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + C964261AAFC1EA02B9305022B88C398A /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAF3FE277629AA2DE13A72DCA72E8FC5 /* Closures.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + CA00C21F8A03E237E579CD6DA42B0DF0 /* LSMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 27B6F67D82FFE2DE96C1CB9AD45113B2 /* LSMatcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CA303CF6D30D41F05C81DF35576B6C34 /* LSMatcheable.h in Headers */ = {isa = PBXBuildFile; fileRef = 80CAF65F2FB9DC5364085BDF485A7B2E /* LSMatcheable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CAB36E2E9ADBC842C1FC0235195764FD /* CurrentTestCaseTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 151E5DE6EE45E6269ADCC6553AF00E79 /* CurrentTestCaseTracker.h */; settings = {ATTRIBUTES = (Private, ); }; }; + CCDFB6611155BB0F4831F06A1A8E63C2 /* NSString+Matcheable.m in Sources */ = {isa = PBXBuildFile; fileRef = EF183B545724D34251F28485042C0290 /* NSString+Matcheable.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + CDC8E7BC4F6D7941783CA1669F3AEC18 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73E8F0BF0AB8AC6DA3C9D02FABA632B8 /* NetworkReachabilityManager.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + D026942696BBAE215298038689DF4952 /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 685B33750C734FE31B3CFC8680BBC514 /* Callsite.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + D1FF865FECBBEC7089ACA994F1C0AA48 /* LSStubRequestDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = D8F2A7570F3CB4CE926D551CF3787E17 /* LSStubRequestDSL.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + D2B3B8A5532F9F084D2855970798CB82 /* LSHTTPClientHook.h in Headers */ = {isa = PBXBuildFile; fileRef = 705F1B1A29FAA942A65434FB4815A36D /* LSHTTPClientHook.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D5E0BE17FA1603C8607E85110ED3FC2C /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 0686698A558C4EBF75CBEAFED937E9FF /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D7A646B09D05BD9423A1629EC6CC662B /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCF9E52F635C732096391AFDC37DBD19 /* HooksPhase.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; D9646B319A6BBF5191BB979D007B19F5 /* UIColor+AstroGadgets.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDD291DBB3F60DEB32D3F9C5F08524ED /* UIColor+AstroGadgets.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - DB1E4BBCDC5993D6A360DF4CF5B59FE2 /* BeVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B67C20266A4C50A1C347EA85C1B8814 /* BeVoid.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - DB294A14E23364B8B2B4E46FD8677FFB /* Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2767B46482B0569CB7A3D8A5171E1481 /* Quick-dummy.m */; }; - DB2D57B1574B84BC7A733F47613080DC /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2684360A9E22977194A9F7BAC3580666 /* AdapterProtocols.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - DC7E1C63312C0B4B7C76E6C9C4F1949C /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5346D1563A1A298C988CF5F943C093A /* AssertionDispatcher.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - DE94765732B7FBCD78E56173F4A782ED /* LSStubRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CE296A8C853B548D6A84BD8B5CFB0E8 /* LSStubRequest.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DB294A14E23364B8B2B4E46FD8677FFB /* Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 79D0014189CEC8B9AE487CDBA2E11C08 /* Quick-dummy.m */; }; + DBDBDB3890148EC75CA14100F9F40DB6 /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45F0E9C963167B5C1650CFD3EA7C4DF0 /* BeLessThanOrEqual.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + DE94765732B7FBCD78E56173F4A782ED /* LSStubRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 8EDF311A32112DD839DBA94581ADB793 /* LSStubRequest.h */; settings = {ATTRIBUTES = (Project, ); }; }; E003A741B5F295E49BB25972DDCD3EC2 /* EnumCountable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F511D0AF6267ABF4691C1EDE99FB659D /* EnumCountable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - E07A45CD453CFC98DE69AA370E5780F9 /* NSRegularExpression+Matcheable.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DF421BBCDC5566E84F21FCB2FD3C914 /* NSRegularExpression+Matcheable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E07A45CD453CFC98DE69AA370E5780F9 /* NSRegularExpression+Matcheable.h in Headers */ = {isa = PBXBuildFile; fileRef = FBDECF0A766E709C9FB6C2DC404AA7B8 /* NSRegularExpression+Matcheable.h */; settings = {ATTRIBUTES = (Public, ); }; }; E1A024733661B5738EE3884FB7AB4984 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BCA294AF3615B183F578E3E71D213E3 /* XCTest.framework */; }; - E39FF06D1FA27A05A466E7F2BD57563A /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = E54303E2686DF60500CC0A595F9B66D0 /* Stringers.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + E2AF82FAED429162D2F8C13802029210 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; + E2FB580DEEC64761CFB3586EBC0A128C /* BeVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2C2E4514848A3670BDD18999793E077 /* BeVoid.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + E4F4F88CF0EA6E1FE71AFC5F827CE94D /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = D7BEF6DE86DF197855B5B6323D725CA3 /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E5A9AF7EFA781F806C84AA56F8B79A5C /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0528BA73A704BD372344FFEC1B84183A /* BeEmpty.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + E7E4AEB8857587C426257582E6829D39 /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EF8825FDA61EEE048759EE17D53E449 /* NMBExceptionCapture.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; E8ABE21E14978ABC608F931E1E91039E /* HTTPStatusCode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 327D1EF3F0D47051C002D2C9724D5581 /* HTTPStatusCode.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; E8DC5C8D0C37517C1E9309C63EFED4D0 /* Astro-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = AD7D87EC77CCE2F8C0B6D5BD0C78F808 /* Astro-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EADDC14CBF173E01401098091976B5F9 /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D0153C0D9E5372AD43FC81C52526302 /* NMBExpectation.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - EB9C4D2E388805F9157AA356D4A857D5 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = D04E964F3DB35CE6A55222A2A22E06CA /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EC336944FCF11CEC2C298BFD54B1B863 /* NSData+Matcheable.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BFE4E270087F7D5D4D3C85F001C5D61 /* NSData+Matcheable.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + EAA6694D3070ED16224DF01435279BAC /* mach_excServer.c in Sources */ = {isa = PBXBuildFile; fileRef = 215A122F10C07D394FB8D890B27EBECC /* mach_excServer.c */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; + EC336944FCF11CEC2C298BFD54B1B863 /* NSData+Matcheable.m in Sources */ = {isa = PBXBuildFile; fileRef = 12E640D001A21CA43DE97111B2D12B9C /* NSData+Matcheable.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; EC5A747B55D5C84C98D096A78A4DCACE /* Astro-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CF059E9D75DEFA1FC51BA89F96FCD54 /* Astro-dummy.m */; }; ED1BA82935766174DD32423269DFAF7F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */; }; - ED4D59B3E02651D2E5C2A0545F7AB611 /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A83BCB83F2572A3251B13551F69A138 /* DispatchQueue+Alamofire.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - EE9BD67665F455A58EB00E695FD2BE3F /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D2CCF46E1B0888E24EB6F6B0E532B2 /* ThrowError.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + ED4D59B3E02651D2E5C2A0545F7AB611 /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EBEB6366B5924DB3BA1BC3C15ADAFED /* DispatchQueue+Alamofire.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; F1F1BBE3F7808250C4C027D5A7780F7A /* SwiftTask.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDE84FF0D7B9663C062BD966122BCA44 /* SwiftTask.framework */; }; - F253A82332FB27BF37823F9D25B938B4 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A481A909D77FF7E93DD19C841760A26 /* Request.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + F253A82332FB27BF37823F9D25B938B4 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BD4F43195ADC43288EC4E5B87B12A78 /* Request.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; F2A1A21D2EF54169CC88B33BD85BB6C5 /* KeychainAccess.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F9C1070A7DA056DC96366DD7AB5D032 /* KeychainAccess.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - F5964D54755EA5CA5261EA833C1FC3E1 /* _StateMachine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EF364BB6F5D1DB9851B6BFC10060F2F /* _StateMachine.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - F65BC45BCF2155582AFE03DE625352A3 /* NSString+QCKSelectorName.m in Sources */ = {isa = PBXBuildFile; fileRef = 78E2E262C85B2AF1456483A15F4328E4 /* NSString+QCKSelectorName.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - F682F23BCD82A89264547460CBA9F077 /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA131598253CE58BF21F626715CEF42 /* FailureMessage.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - F76969F8B60A010FAA79D960E251F4EC /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72C14B4911E5A56CEF192041CD902F42 /* BeEmpty.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + F3199E5D140F672B588EC44DE319EDA3 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = CF6DCE81749F167FC67FB446774DE08B /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F5964D54755EA5CA5261EA833C1FC3E1 /* _StateMachine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82279E55ED2DD732A33040D953BA35E8 /* _StateMachine.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; F860A14430F1CACDA8DD8D930D9D31C8 /* Pods-AstroTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2968311D6DF69E6F64E0B003853A1588 /* Pods-AstroTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F90CAA20F341B4B5811A6031B7BBA9B5 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E5DE73C1E1F70D7DECB931C65A67679 /* Alamofire.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - FA1149FAC1E3BDDC971E04A052037DC0 /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3B021591B3A1EAA8BCA339C18A3E219 /* HaveCount.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + F90CAA20F341B4B5811A6031B7BBA9B5 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0627B4F18408C0671B224D45223ACDF /* Alamofire.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + F94967BD547D665FE10682D8CCCFF912 /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C3A5D3BAC460B45231D375C5EDE02C6 /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F9E597EEF0E08D22D2C039A88D27C287 /* XCTestObservationCenter+Register.m in Sources */ = {isa = PBXBuildFile; fileRef = 273AFE09E29D054E989C27C406F8407B /* XCTestObservationCenter+Register.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; FB67CA760B62D85727796D8D68990E4A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D97CC484A2DBEFEC771C1025EBC41CCE /* UIKit.framework */; }; - FB7D8621EE4D6676288245B294022C47 /* Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF2D557873185C73BE025D1BBE21A10 /* Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FC55C32A0B9D387BFD57FCB2E19753BE /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA13E6763DFBF5B5D1943920BE89D610 /* Validation.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - FCFC2208684969E5BDF9F439AEE58162 /* NSString+Matcheable.h in Headers */ = {isa = PBXBuildFile; fileRef = E64F5CCF316D56E2C07425CC0D9DCB90 /* NSString+Matcheable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FB7D8621EE4D6676288245B294022C47 /* Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DD69344463C6D11B4E7516C0AFFF745E /* Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FC55C32A0B9D387BFD57FCB2E19753BE /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0C7C0D2C306844D403D2772A877C799 /* Validation.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + FCFC2208684969E5BDF9F439AEE58162 /* NSString+Matcheable.h in Headers */ = {isa = PBXBuildFile; fileRef = D199A3E8156AE7903C0E27E83A5E4E29 /* NSString+Matcheable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FDE2F28602C071D8D549F37B7A86A339 /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9841392E475E61F60E026C0004E8FF26 /* Async.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble -w -Xanalyzer -analyzer-disable-all-checks"; }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -318,7 +329,7 @@ isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 40FF1C77152F384080A1A02E90A36DA9; + remoteGlobalIDString = 72E30CEFE495DD0EB9CFB72FCF80894C; remoteInfo = Nimble; }; DE2F729048A6ECF6A6C4E1CFFEC59E90 /* PBXContainerItemProxy */ = { @@ -332,281 +343,284 @@ /* Begin PBXFileReference section */ 00351519C4E7E45AB67C9AE54E9BC5FF /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 0173D589AE58B242AF1C54C7B7C4A174 /* QuickSpec.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpec.m; path = Sources/Quick/QuickSpec.m; sourceTree = ""; }; - 018233AF6177486FA08EDB6B819B8852 /* Nimble.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.xcconfig; sourceTree = ""; }; + 00F11A8B3CAF699F2B925AA442CC06D8 /* NMBObjCMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBObjCMatcher.swift; path = Sources/Nimble/Adapters/NMBObjCMatcher.swift; sourceTree = ""; }; + 018AC161D8915DFDD564EFA2273B3987 /* DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DSL.h; path = Sources/NimbleObjectiveC/DSL.h; sourceTree = ""; }; 01969FDB7BE5215049329E2826518627 /* Pods-Astro-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Astro-umbrella.h"; sourceTree = ""; }; - 0381DB03287A652D133655CC87C0F3EC /* NMBStringify.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBStringify.m; path = Sources/Nimble/Adapters/ObjectiveC/NMBStringify.m; sourceTree = ""; }; - 03C4A91411BA8D06FCB83DB7EB88B2D9 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Quick/Filter.swift; sourceTree = ""; }; - 04ABE7FAC5DD55B63509FCD2B4FC184E /* NSData+Matcheable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSData+Matcheable.h"; path = "Nocilla/Matchers/NSData+Matcheable.h"; sourceTree = ""; }; - 054E3AE9685647513F4760BCC648C0FA /* HooksPhase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HooksPhase.swift; path = Sources/Quick/Hooks/HooksPhase.swift; sourceTree = ""; }; - 06DA7638B59C97A622CF8EC4E26CBF68 /* LSHTTPStubURLProtocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPStubURLProtocol.h; path = Nocilla/Hooks/NSURLRequest/LSHTTPStubURLProtocol.h; sourceTree = ""; }; - 071801FD957F89FDFD4A42FA1CE52621 /* ASIHTTPRequestStub.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ASIHTTPRequestStub.h; path = Nocilla/Hooks/ASIHTTPRequest/ASIHTTPRequestStub.h; sourceTree = ""; }; - 0772C22DA40FABA4BC0475C3951BEB90 /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Nimble.modulemap; sourceTree = ""; }; - 0AD11791D91B1E8BE6A15A123CCD5ABB /* JSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSON.swift; path = Sources/JSON.swift; sourceTree = ""; }; - 0C12E2AC29BB461B5CA36A55A98309C9 /* QuickConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickConfiguration.m; path = Sources/Quick/Configuration/QuickConfiguration.m; sourceTree = ""; }; + 02F144FF0E29EE422B0A2B133E88D247 /* World+DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "World+DSL.h"; path = "Sources/QuickObjectiveC/DSL/World+DSL.h"; sourceTree = ""; }; + 042869A08CF3409EC2730F95F519A0F2 /* CwlCatchBadInstruction.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlCatchBadInstruction.h; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h; sourceTree = ""; }; + 0528BA73A704BD372344FFEC1B84183A /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Sources/Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; + 0686698A558C4EBF75CBEAFED937E9FF /* NMBExceptionCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBExceptionCapture.h; path = Sources/NimbleObjectiveC/NMBExceptionCapture.h; sourceTree = ""; }; + 06D5EF8B45FE60AC6EDAC8FCAEACD8DE /* QuickSpec.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpec.m; path = Sources/QuickObjectiveC/QuickSpec.m; sourceTree = ""; }; + 071EF70F48ED17641B729D4449E52994 /* NSString+QCKSelectorName.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+QCKSelectorName.m"; path = "Sources/QuickObjectiveC/NSString+QCKSelectorName.m"; sourceTree = ""; }; + 08C47E51BAB892EFC84CCBF988BD7503 /* Cancellable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancellable.swift; path = SwiftTask/Cancellable.swift; sourceTree = ""; }; + 091BC8190E80590146A6EFB11A4B99F9 /* LSStubResponse.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSStubResponse.h; path = Nocilla/Stubs/LSStubResponse.h; sourceTree = ""; }; + 09C8AE3C7337CCBD768F964F383CBC0D /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Nimble/Expression.swift; sourceTree = ""; }; + 0D732738D87FBCCD8CAD7BDE2BC93D3C /* LSHTTPRequestDiff.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSHTTPRequestDiff.m; path = Nocilla/Diff/LSHTTPRequestDiff.m; sourceTree = ""; }; + 0DC9E56A8D14C7D63CD12CA5A1D410A5 /* LSNocilla.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSNocilla.h; path = Nocilla/LSNocilla.h; sourceTree = ""; }; 0E30C666974AFD8AE1D15D77D6FAE0D4 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 0F5F08345597F020F21A5AD51E29EE4D /* Route.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Route.swift; sourceTree = ""; }; 0FD350C81335B2D7E13DBA6A353DB0A0 /* Astro-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Astro-prefix.pch"; sourceTree = ""; }; - 1053740C7A0A2C8875D945447E55AF4E /* LSHTTPBody.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPBody.h; path = Nocilla/Model/LSHTTPBody.h; sourceTree = ""; }; - 12ADD80150F556C531DE5DA952B00FCF /* NSURLRequest+LSHTTPRequest.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLRequest+LSHTTPRequest.m"; path = "Nocilla/Hooks/NSURLRequest/NSURLRequest+LSHTTPRequest.m"; sourceTree = ""; }; - 12C64E971D6125A9DD3C66125BC78175 /* ASIHTTPRequestStub.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ASIHTTPRequestStub.m; path = Nocilla/Hooks/ASIHTTPRequest/ASIHTTPRequestStub.m; sourceTree = ""; }; - 13982F321AEFE4FC8A435F23B9E0B951 /* LSASIHTTPRequestHook.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSASIHTTPRequestHook.m; path = Nocilla/Hooks/ASIHTTPRequest/LSASIHTTPRequestHook.m; sourceTree = ""; }; - 15AB7D4A43EBBAA638AF047CF1486BC7 /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Sources/Quick/World.swift; sourceTree = ""; }; - 16A97930F8C7CD98BB75727908A6CEEF /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; - 17937D695835B2FAFA87680EBD2DDEEB /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Nimble/Expression.swift; sourceTree = ""; }; - 1AB54E1DE71B88A7C5744C4262CC89A2 /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; - 1AC20E208201C4090E34097C86AA98A7 /* Expectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expectation.swift; path = Sources/Nimble/Expectation.swift; sourceTree = ""; }; - 1BFE4E270087F7D5D4D3C85F001C5D61 /* NSData+Matcheable.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSData+Matcheable.m"; path = "Nocilla/Matchers/NSData+Matcheable.m"; sourceTree = ""; }; - 1CDCD82A818E6E82200A01860040B5C7 /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Sources/Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; + 1072D15ED5ADB6DC83CCB4B1AD251A7A /* SwiftTask-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftTask-umbrella.h"; sourceTree = ""; }; + 11D1BE32ADBFF181084FAEA58AD60F2E /* CwlCatchBadInstruction.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlCatchBadInstruction.m; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m; sourceTree = ""; }; + 12E640D001A21CA43DE97111B2D12B9C /* NSData+Matcheable.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSData+Matcheable.m"; path = "Nocilla/Matchers/NSData+Matcheable.m"; sourceTree = ""; }; + 151E5DE6EE45E6269ADCC6553AF00E79 /* CurrentTestCaseTracker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CurrentTestCaseTracker.h; path = Sources/NimbleObjectiveC/CurrentTestCaseTracker.h; sourceTree = ""; }; + 16D6F9AEC686EC3BBF1F9BA7D43A92B6 /* JSONLiteralConvertible.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONLiteralConvertible.swift; path = Sources/JSONLiteralConvertible.swift; sourceTree = ""; }; + 19AD8BD7C876614E7500B225BFEDEA4D /* JSONEncodable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodable.swift; path = Sources/JSONEncodable.swift; sourceTree = ""; }; + 1B31B1D71EFA9C9F6BC2B28D6ED7A6B8 /* SourceLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SourceLocation.swift; path = Sources/Nimble/Utils/SourceLocation.swift; sourceTree = ""; }; + 1B74629F50D82A8DC2A0634DF371A060 /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Sources/Nimble/Matchers/Equal.swift; sourceTree = ""; }; + 1C073BEEC136249637E22B7C6F9413C4 /* LSNocilla.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSNocilla.m; path = Nocilla/LSNocilla.m; sourceTree = ""; }; + 1C3A5D3BAC460B45231D375C5EDE02C6 /* QuickSpec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpec.h; path = Sources/QuickObjectiveC/QuickSpec.h; sourceTree = ""; }; + 1CD9E02F196DDDDD91C9DB3A95391F7B /* Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-prefix.pch"; sourceTree = ""; }; 1CF059E9D75DEFA1FC51BA89F96FCD54 /* Astro-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Astro-dummy.m"; sourceTree = ""; }; - 1D6F35F873EE68AC1B849C53C8377143 /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSBundle+CurrentTestBundle.swift"; path = "Sources/Quick/NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; - 1E02FD2E676BD9EBE51D94DD72A393CA /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Sources/Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; - 1ED1CA7206A0394D9BE404F9CFCD177D /* Cancellable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancellable.swift; path = SwiftTask/Cancellable.swift; sourceTree = ""; }; - 21295EB820534EBAAEB5834DBCE02CC8 /* ExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleGroup.swift; path = Sources/Quick/ExampleGroup.swift; sourceTree = ""; }; - 213513F3A16D2DF21DBB9B616F107E33 /* Functional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Functional.swift; path = Sources/Nimble/Utils/Functional.swift; sourceTree = ""; }; - 213754F1822D3389F0626B85751B244C /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Nimble/DSL.swift; sourceTree = ""; }; - 23AFD3DA2A1EE218A39A93ACE7800FEA /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Quick/Configuration/Configuration.swift; sourceTree = ""; }; - 24AB3FEDC733FF0C724BA4579F65C1CB /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; + 1DFF530B8460BE93B736F122B6826654 /* NMBStringify.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBStringify.m; path = Sources/NimbleObjectiveC/NMBStringify.m; sourceTree = ""; }; + 1E3C0D761EAB5DED3CDEEF399643814B /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1E87CE6D3EE2DEDD47199194199203F0 /* Freddy-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Freddy-umbrella.h"; sourceTree = ""; }; + 1EF8825FDA61EEE048759EE17D53E449 /* NMBExceptionCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBExceptionCapture.m; path = Sources/NimbleObjectiveC/NMBExceptionCapture.m; sourceTree = ""; }; + 1F8463461A3040238873251F0DA89F51 /* BeIdenticalTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeIdenticalTo.swift; path = Sources/Nimble/Matchers/BeIdenticalTo.swift; sourceTree = ""; }; + 20223D11D9ABF2E670D1730866CBBEF7 /* SwiftTask.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SwiftTask.h; path = SwiftTask/SwiftTask.h; sourceTree = ""; }; + 20AEC20748F1663BACBD6FD36F120697 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Quick/Configuration/Configuration.swift; sourceTree = ""; }; + 215A122F10C07D394FB8D890B27EBECC /* mach_excServer.c */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.c; name = mach_excServer.c; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c; sourceTree = ""; }; + 22810EF07F547FE210012C8D3998B21B /* AsyncMatcherWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncMatcherWrapper.swift; path = Sources/Nimble/Matchers/AsyncMatcherWrapper.swift; sourceTree = ""; }; + 22C9025EE20B48DF9D5171FD0DF74CC9 /* ThrowAssertion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowAssertion.swift; path = Sources/Nimble/Matchers/ThrowAssertion.swift; sourceTree = ""; }; + 22E228A44F7AEFB0BDEFF1D782F9A348 /* LSStubResponseDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSStubResponseDSL.h; path = Nocilla/DSL/LSStubResponseDSL.h; sourceTree = ""; }; + 23E606DCE7B953825CBCE1A0382D13D8 /* MatcherFunc.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherFunc.swift; path = Sources/Nimble/Matchers/MatcherFunc.swift; sourceTree = ""; }; 25D7A7C2951F50118DCBAC7528F922D9 /* UIViewController+AstroGadgets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIViewController+AstroGadgets.swift"; sourceTree = ""; }; - 25FBBE12B9698BE57E33603547EB37BC /* Freddy.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Freddy.modulemap; sourceTree = ""; }; - 26497E5736035420A6E2C4002BFCA9B2 /* NSData+Nocilla.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSData+Nocilla.m"; path = "Nocilla/Categories/NSData+Nocilla.m"; sourceTree = ""; }; - 2684360A9E22977194A9F7BAC3580666 /* AdapterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AdapterProtocols.swift; path = Sources/Nimble/Adapters/AdapterProtocols.swift; sourceTree = ""; }; - 2767B46482B0569CB7A3D8A5171E1481 /* Quick-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Quick-dummy.m"; sourceTree = ""; }; + 271683EE071FE4B5A83D3567AC06B69E /* BeAnInstanceOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAnInstanceOf.swift; path = Sources/Nimble/Matchers/BeAnInstanceOf.swift; sourceTree = ""; }; + 273AFE09E29D054E989C27C406F8407B /* XCTestObservationCenter+Register.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestObservationCenter+Register.m"; path = "Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m"; sourceTree = ""; }; + 27B6F67D82FFE2DE96C1CB9AD45113B2 /* LSMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSMatcher.h; path = Nocilla/Matchers/LSMatcher.h; sourceTree = ""; }; + 28620A4EE8E9AD7EB25010E54FBE0C88 /* SwiftTask-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftTask-prefix.pch"; sourceTree = ""; }; + 28E7D50C8D217D7E3F2764432E597CF4 /* LSASIHTTPRequestAdapter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSASIHTTPRequestAdapter.m; path = Nocilla/Hooks/ASIHTTPRequest/LSASIHTTPRequestAdapter.m; sourceTree = ""; }; 2968311D6DF69E6F64E0B003853A1588 /* Pods-AstroTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-AstroTests-umbrella.h"; sourceTree = ""; }; - 29DB305A733900DA8BE91E99DA1F6678 /* SwiftTask-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftTask-dummy.m"; sourceTree = ""; }; - 2A355A0E9474F123020DFB6D08415B7E /* World+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "World+DSL.swift"; path = "Sources/Quick/DSL/World+DSL.swift"; sourceTree = ""; }; - 2B5702560A020F3507BFBC62776005EF /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Alamofire.modulemap; sourceTree = ""; }; - 2E5570E2270E74080439F093AE77AF01 /* NSURLRequest+DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLRequest+DSL.h"; path = "Nocilla/Hooks/NSURLRequest/NSURLRequest+DSL.h"; sourceTree = ""; }; - 2F9A86574F2A7071B2058EF9649F9F4F /* AllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AllPass.swift; path = Sources/Nimble/Matchers/AllPass.swift; sourceTree = ""; }; - 2FCAC907B638BCDE89FBC4E26D1542AF /* Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-prefix.pch"; sourceTree = ""; }; - 300B0279FE72478F7D093954D773B4DC /* SwiftTask-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftTask-prefix.pch"; sourceTree = ""; }; - 305F507D0BC868E0EFA0E492C50BB344 /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Sources/Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; + 298DABB9BB2FB2DA441B86731F89F528 /* LSASIHTTPRequestAdapter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSASIHTTPRequestAdapter.h; path = Nocilla/Hooks/ASIHTTPRequest/LSASIHTTPRequestAdapter.h; sourceTree = ""; }; + 2ADACDEBD467D10513EA63E6102B2F22 /* LSMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSMatcher.m; path = Nocilla/Matchers/LSMatcher.m; sourceTree = ""; }; + 2E5401E977AD5FDBBACE2190887C0E6F /* PostNotification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PostNotification.swift; path = Sources/Nimble/Matchers/PostNotification.swift; sourceTree = ""; }; 327D1EF3F0D47051C002D2C9724D5581 /* HTTPStatusCode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HTTPStatusCode.swift; sourceTree = ""; }; - 334E9C3CECC5351EE96F55569E1FCEDD /* XCTestObservationCenter+Register.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestObservationCenter+Register.m"; path = "Sources/Nimble/Adapters/ObjectiveC/XCTestObservationCenter+Register.m"; sourceTree = ""; }; - 34E7DEA475E58F139AD7A9775C450E8F /* LSHTTPResponse.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPResponse.h; path = Nocilla/Model/LSHTTPResponse.h; sourceTree = ""; }; + 32ED0E935E3BAF4A9A0EAAA12E4A714E /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Sources/Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; 35BD3EF4780C95F238BF55A79833BFFC /* UICollectionView+AstroGadgets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UICollectionView+AstroGadgets.swift"; sourceTree = ""; }; - 368ABCA024EEAE1AF88A306FFE3B6E86 /* JSONDecodable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONDecodable.swift; path = Sources/JSONDecodable.swift; sourceTree = ""; }; - 377FF62898B9F233DAEAC2A03F7ED71F /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Sources/Quick/ExampleMetadata.swift; sourceTree = ""; }; - 396035A274BE85E2A79A14557F188DE9 /* AsyncMatcherWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncMatcherWrapper.swift; path = Sources/Nimble/Matchers/AsyncMatcherWrapper.swift; sourceTree = ""; }; - 3AA005D7A247CDFA9BFAE4F33F1950A4 /* Example.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Example.swift; path = Sources/Quick/Example.swift; sourceTree = ""; }; - 3CE296A8C853B548D6A84BD8B5CFB0E8 /* LSStubRequest.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSStubRequest.h; path = Nocilla/Stubs/LSStubRequest.h; sourceTree = ""; }; - 3D0153C0D9E5372AD43FC81C52526302 /* NMBExpectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBExpectation.swift; path = Sources/Nimble/Adapters/ObjectiveC/NMBExpectation.swift; sourceTree = ""; }; - 3EF364BB6F5D1DB9851B6BFC10060F2F /* _StateMachine.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = _StateMachine.swift; path = SwiftTask/_StateMachine.swift; sourceTree = ""; }; - 4029957B3F8655025D5D20920ED34752 /* Nimble.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nimble.h; path = Sources/Nimble/Nimble.h; sourceTree = ""; }; + 35FEDC55395B40D8E6BDE2EA52A6FC36 /* Example.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Example.swift; path = Sources/Quick/Example.swift; sourceTree = ""; }; + 35FEFFE81F749A3E4CB385C880B7BCD1 /* Nimble-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nimble-dummy.m"; sourceTree = ""; }; + 38704C04F766AD087FAC725691D3AE02 /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Sources/Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; + 395D8F5906B8920E261C2EB3D176D9F5 /* DSL+Wait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Wait.swift"; path = "Sources/Nimble/DSL+Wait.swift"; sourceTree = ""; }; + 3B3577B8CF40135FD528ADC3A0961A46 /* Freddy-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Freddy-prefix.pch"; sourceTree = ""; }; + 3C722BFE51DE5EC90209D19ECD8540E1 /* String+FileName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+FileName.swift"; path = "Sources/Quick/String+FileName.swift"; sourceTree = ""; }; + 3CD687773372933FE0C29624852008F2 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; + 3E47B4F75D7BC6FDC4F63AF9BBE63A47 /* Nocilla.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Nocilla.modulemap; sourceTree = ""; }; + 3FBE565E9FFFBC9F4BFA295826DEE17F /* Stringers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stringers.swift; path = Sources/Nimble/Utils/Stringers.swift; sourceTree = ""; }; 40766F0C467159B985AA2723FF099609 /* Log.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Log.swift; sourceTree = ""; }; - 419B8EC230B0AF8A2877C52EDD18C518 /* LSStubResponse.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSStubResponse.m; path = Nocilla/Stubs/LSStubResponse.m; sourceTree = ""; }; + 419F563941A11F843C9901ABDD72EFD1 /* Freddy-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Freddy-dummy.m"; sourceTree = ""; }; + 41B13CF9F52B5FF0B725DD6AA4D6315F /* ThrowError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowError.swift; path = Sources/Nimble/Matchers/ThrowError.swift; sourceTree = ""; }; 41D136DE7AD7FCE83428ECEF04EDC1F7 /* Freddy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Freddy.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 475A05A4D234AEB496174CD3ECE69914 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; - 489CA6D4A92715860DCDDFDB61B71884 /* LSASIHTTPRequestAdapter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSASIHTTPRequestAdapter.m; path = Nocilla/Hooks/ASIHTTPRequest/LSASIHTTPRequestAdapter.m; sourceTree = ""; }; - 48B28117F0E4929218975EBCD7755CD8 /* Freddy-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Freddy-prefix.pch"; sourceTree = ""; }; + 420F4BAB4F683D03FBFA5AD7938B9AD1 /* World.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = World.h; path = Sources/QuickObjectiveC/World.h; sourceTree = ""; }; + 434DF22B7BBC30B5E3870DEA54191263 /* NSURLRequest+DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLRequest+DSL.h"; path = "Nocilla/Hooks/NSURLRequest/NSURLRequest+DSL.h"; sourceTree = ""; }; + 439BCCFCC519BD3BFADDE0AD2B1E1D10 /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; + 43AFF0AF2C6A3B6953AA60F44B6C74E5 /* JSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSON.swift; path = Sources/JSON.swift; sourceTree = ""; }; + 43B1FD22744524331F663AF17391C873 /* NSString+QCKSelectorName.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+QCKSelectorName.h"; path = "Sources/QuickObjectiveC/NSString+QCKSelectorName.h"; sourceTree = ""; }; + 43E4D1066EB44FB7BBE0C05352348E7F /* LSDataMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSDataMatcher.h; path = Nocilla/Matchers/LSDataMatcher.h; sourceTree = ""; }; + 45E2CDCB48C2960B6288675AF1FF0E5B /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; + 45F0E9C963167B5C1650CFD3EA7C4DF0 /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThanOrEqual.swift; path = Sources/Nimble/Matchers/BeLessThanOrEqual.swift; sourceTree = ""; }; + 482DF7435CAE0FA6405497EC0EF2D288 /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; 4997DBF40D15DC61455083F9414614A8 /* Pods-AstroTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-AstroTests-dummy.m"; sourceTree = ""; }; - 49C52E23E4263893DB7947504A16DF2C /* JSONParser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONParser.swift; path = Sources/JSONParser.swift; sourceTree = ""; }; - 4A481A909D77FF7E93DD19C841760A26 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; + 4A32029E1D904B5B2A1DE1652D056556 /* NSURLRequest+LSHTTPRequest.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLRequest+LSHTTPRequest.h"; path = "Nocilla/Hooks/NSURLRequest/NSURLRequest+LSHTTPRequest.h"; sourceTree = ""; }; 4BC8039B74D4913DB1E703B667824C32 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 4BE2DE3A06C049929FED7B6EA5BD77C1 /* JSONSubscripting.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONSubscripting.swift; path = Sources/JSONSubscripting.swift; sourceTree = ""; }; - 4BF2D557873185C73BE025D1BBE21A10 /* Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-umbrella.h"; sourceTree = ""; }; - 4C47C4F0D9B36F88D240C445B404CA9A /* JSONEncodingDetector.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodingDetector.swift; path = Sources/JSONEncodingDetector.swift; sourceTree = ""; }; - 4DA20E139146E66B853599325D0EB814 /* BeIdenticalTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeIdenticalTo.swift; path = Sources/Nimble/Matchers/BeIdenticalTo.swift; sourceTree = ""; }; - 4E35D5AB5C88B5BA0D575B5E6440C639 /* BeGreaterThanOrEqualTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThanOrEqualTo.swift; path = Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift; sourceTree = ""; }; + 4D3CCB37118665EF74FAD3EFBF9A833B /* LSStringMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSStringMatcher.m; path = Nocilla/Matchers/LSStringMatcher.m; sourceTree = ""; }; + 4DA62206B560BB04331EC74341C0AB5E /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 4F253C050EA740DAB7F27AEC93703F14 /* Nocilla.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nocilla.h; path = Nocilla/Nocilla.h; sourceTree = ""; }; + 4F6BE2A247593D064F2152B0CA22C31C /* BeAKindOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAKindOf.swift; path = Sources/Nimble/Matchers/BeAKindOf.swift; sourceTree = ""; }; 4F9C1070A7DA056DC96366DD7AB5D032 /* KeychainAccess.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = KeychainAccess.swift; sourceTree = ""; }; - 5005FBED4883E5ECB521DFF686AF8E4E /* LSStubRequestDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSStubRequestDSL.m; path = Nocilla/DSL/LSStubRequestDSL.m; sourceTree = ""; }; - 5022140F377B8260DCB428BF0F20E52C /* LSNocilla.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSNocilla.m; path = Nocilla/LSNocilla.m; sourceTree = ""; }; - 512114DC23E7E8EE7A0AF19D564A8039 /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; 5130E6C4B0648E65F27B4B60E917F4D9 /* Astro.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Astro.modulemap; sourceTree = ""; }; - 51D68EE622CCBC2517A7E3842815620D /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; - 52371319E2C73E2815BF88ED9A42E25F /* Nimble-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nimble-dummy.m"; sourceTree = ""; }; - 5354576D7F0C0BE772A0B0DB707D9FD9 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 53A987C36D5AF811928370956EDA6F7B /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Sources/Nimble/Adapters/ObjectiveC/DSL.m; sourceTree = ""; }; - 53DE0423F71B8E3831A57365BC6019A1 /* Nimble-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-prefix.pch"; sourceTree = ""; }; - 54509D781D6C2DA65347973554D03C73 /* Quick.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.xcconfig; sourceTree = ""; }; - 546BBA0E106E3A9EF12D5EE0C95B0462 /* LSRegexMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSRegexMatcher.m; path = Nocilla/Matchers/LSRegexMatcher.m; sourceTree = ""; }; - 550E4A859435509BAB6638D3E05ED846 /* World.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = World.h; path = Sources/Quick/World.h; sourceTree = ""; }; + 5214EA8CA0429CA4A308C2FC112F5541 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; + 5348EC8A28239000A63C8FF4239D4DE6 /* QCKDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QCKDSL.h; path = Sources/QuickObjectiveC/DSL/QCKDSL.h; sourceTree = ""; }; + 5470804D3E23BD6A0573E0A40894EDB2 /* AllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AllPass.swift; path = Sources/Nimble/Matchers/AllPass.swift; sourceTree = ""; }; 55E31E2F9FA8BECABC6F58AD57B2EBC8 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 57F88C7E49227690DB30C290A9CEADBF /* SourceLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SourceLocation.swift; path = Sources/Nimble/Utils/SourceLocation.swift; sourceTree = ""; }; - 58FC63C8CBFD7E521F24241853DF5C14 /* _RecursiveLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = _RecursiveLock.swift; path = SwiftTask/_RecursiveLock.swift; sourceTree = ""; }; - 5990DDE7DB7FAD5BF27CAC2D99935E28 /* LSNSURLHook.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSNSURLHook.h; path = Nocilla/Hooks/NSURLRequest/LSNSURLHook.h; sourceTree = ""; }; - 59A8DB2950CDF625EDB83CE63F46A6F6 /* LSNocilla.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSNocilla.h; path = Nocilla/LSNocilla.h; sourceTree = ""; }; - 5A83BCB83F2572A3251B13551F69A138 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; - 5B337EA4DB32DBBF01A45AD2DA159EEB /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Nimble/Utils/Async.swift; sourceTree = ""; }; - 5D1F363DAC6ADA834FD28B2BA055E4F7 /* LSMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSMatcher.m; path = Nocilla/Matchers/LSMatcher.m; sourceTree = ""; }; - 5E5DE73C1E1F70D7DECB931C65A67679 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - 5F16FD68893A2ED451E86E1599F8FC16 /* LSDataMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSDataMatcher.h; path = Nocilla/Matchers/LSDataMatcher.h; sourceTree = ""; }; - 5FD76D017AEEF056A8FC7A05D8562C2D /* XCTestSuite+QuickTestSuiteBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestSuite+QuickTestSuiteBuilder.m"; path = "Sources/Quick/XCTestSuite+QuickTestSuiteBuilder.m"; sourceTree = ""; }; - 612F5B7DAD9D03A91ED5FC2A20417E03 /* NSData+Nocilla.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSData+Nocilla.h"; path = "Nocilla/Categories/NSData+Nocilla.h"; sourceTree = ""; }; - 6496FB4F8515747A0F9E50DC22B36E11 /* NMBObjCMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBObjCMatcher.swift; path = Sources/Nimble/Adapters/ObjectiveC/NMBObjCMatcher.swift; sourceTree = ""; }; - 6998EC154F33D892A19AA8FD5E914E03 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 6A2033086B25E850845B6A7EF6B59A56 /* DSL+Wait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Wait.swift"; path = "Sources/Nimble/DSL+Wait.swift"; sourceTree = ""; }; + 55F0CC0D1DAD2512CFF1D6CFEC24AF43 /* Freddy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Freddy.h; path = Sources/Freddy.h; sourceTree = ""; }; + 56262CD3940BBF6860630568948BAE7C /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Quick/Filter.swift; sourceTree = ""; }; + 56456BE95901992704AB3306530F35D9 /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Sources/Nimble/FailureMessage.swift; sourceTree = ""; }; + 56F3D11291D828E7F960D87FB3B3BD04 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5796F3D38D4CC0C747870F1199E04C95 /* LSHTTPRequestDSLRepresentation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSHTTPRequestDSLRepresentation.m; path = Nocilla/DSL/LSHTTPRequestDSLRepresentation.m; sourceTree = ""; }; + 5905376E12FC20FEFB3E8B533527973E /* LSASIHTTPRequestHook.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSASIHTTPRequestHook.h; path = Nocilla/Hooks/ASIHTTPRequest/LSASIHTTPRequestHook.h; sourceTree = ""; }; + 5BD4F43195ADC43288EC4E5B87B12A78 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; + 63CAF6B422DA057CB9D7B2F771C5C1DD /* MatchError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatchError.swift; path = Sources/Nimble/Matchers/MatchError.swift; sourceTree = ""; }; + 685B33750C734FE31B3CFC8680BBC514 /* Callsite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Callsite.swift; path = Sources/Quick/Callsite.swift; sourceTree = ""; }; + 6935ECADFECDEBD203811BF6D9285D30 /* BeLessThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThan.swift; path = Sources/Nimble/Matchers/BeLessThan.swift; sourceTree = ""; }; 6A44E47EFD289B10910E4FDA903A2E9F /* UIView+AstroGadgets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+AstroGadgets.swift"; sourceTree = ""; }; - 6ABDA7E71C2F0EA181105310A6FC9F60 /* LSStubResponseDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSStubResponseDSL.m; path = Nocilla/DSL/LSStubResponseDSL.m; sourceTree = ""; }; 6B4BE48F7C4B52024AA898C9C47426F5 /* Pods-Astro.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Astro.debug.xcconfig"; sourceTree = ""; }; - 6B67C20266A4C50A1C347EA85C1B8814 /* BeVoid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeVoid.swift; path = Sources/Nimble/Matchers/BeVoid.swift; sourceTree = ""; }; - 6B9BB65FFA5699B6F2A3494430B04909 /* LSDataMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSDataMatcher.m; path = Nocilla/Matchers/LSDataMatcher.m; sourceTree = ""; }; 6BCA294AF3615B183F578E3E71D213E3 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - 6C2C94ED0D97068FC1CCAFB424107CBF /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Sources/Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; - 6C3BAC8C7B9A07799DE46B602D115B02 /* SwiftTask.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SwiftTask.h; path = SwiftTask/SwiftTask.h; sourceTree = ""; }; - 6DF25ABEEAE287B7BAF35696B5ABBB4F /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; - 6F781DA3105FD0D4D698C91B2303DE66 /* LSNSURLHook.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSNSURLHook.m; path = Nocilla/Hooks/NSURLRequest/LSNSURLHook.m; sourceTree = ""; }; - 6FA8866188D58E727285A4F69385A638 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; + 6D101D9221BD3C7FD10D7FC56D4D0259 /* LSNSURLHook.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSNSURLHook.h; path = Nocilla/Hooks/NSURLRequest/LSNSURLHook.h; sourceTree = ""; }; + 6EBEB6366B5924DB3BA1BC3C15ADAFED /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; + 705F1B1A29FAA942A65434FB4815A36D /* LSHTTPClientHook.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPClientHook.h; path = Nocilla/Hooks/LSHTTPClientHook.h; sourceTree = ""; }; 71210D5DF69D2929A31C664FA566777D /* Pods-AstroTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-AstroTests-acknowledgements.plist"; sourceTree = ""; }; - 72C14B4911E5A56CEF192041CD902F42 /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Sources/Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; - 73C18D240C638526F78D36934DAA00DC /* LSHTTPRequestDiff.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPRequestDiff.h; path = Nocilla/Diff/LSHTTPRequestDiff.h; sourceTree = ""; }; + 71EB097E97F320C0A5540DC3EE56F8A7 /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Quick.modulemap; sourceTree = ""; }; + 726AD99F23F018BA941D0453A5334B41 /* LSNSURLSessionHook.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSNSURLSessionHook.m; path = Nocilla/Hooks/NSURLSession/LSNSURLSessionHook.m; sourceTree = ""; }; + 72A14CE0AF1C91349D552E053714D575 /* Match.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Match.swift; path = Sources/Nimble/Matchers/Match.swift; sourceTree = ""; }; + 73E8F0BF0AB8AC6DA3C9D02FABA632B8 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; 748EA67BCFF48DE8E76C6F13965EE8E6 /* Astro.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Astro.xcconfig; sourceTree = ""; }; - 75556B87747C12614320AAF5CB884BEF /* NMBExceptionCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBExceptionCapture.m; path = Sources/Nimble/Adapters/ObjectiveC/NMBExceptionCapture.m; sourceTree = ""; }; - 75B4742BC7EE5F35B53FF4C55C5E6B64 /* LSHTTPRequestDSLRepresentation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPRequestDSLRepresentation.h; path = Nocilla/DSL/LSHTTPRequestDSLRepresentation.h; sourceTree = ""; }; - 764D110FFFCD4147FAB007F5CC15C39E /* NMBExceptionCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBExceptionCapture.h; path = Sources/Nimble/Adapters/ObjectiveC/NMBExceptionCapture.h; sourceTree = ""; }; - 7743BBD05243D52E271CDAD63F5B989A /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAnyOf.swift; path = Sources/Nimble/Matchers/SatisfyAnyOf.swift; sourceTree = ""; }; - 77F6A5367DD6585F38FE4EAE6E016F14 /* LSStubResponseDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSStubResponseDSL.h; path = Nocilla/DSL/LSStubResponseDSL.h; sourceTree = ""; }; - 78D81935F9929A6DFE89C95A30163613 /* _Atomic.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = _Atomic.swift; path = SwiftTask/_Atomic.swift; sourceTree = ""; }; - 78E2E262C85B2AF1456483A15F4328E4 /* NSString+QCKSelectorName.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+QCKSelectorName.m"; path = "Sources/Quick/NSString+QCKSelectorName.m"; sourceTree = ""; }; + 7612D5B114271B1DA2A6684D42466E0E /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 76F8FAE11BD3A5684FA3B42290AE2A65 /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Sources/Nimble/Matchers/BeNil.swift; sourceTree = ""; }; + 775A5957C73D966C589B5CF833ED9265 /* LSHTTPStubURLProtocol.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSHTTPStubURLProtocol.m; path = Nocilla/Hooks/NSURLRequest/LSHTTPStubURLProtocol.m; sourceTree = ""; }; + 780A2D1F0CF49C25B2CB9CC25C6A5B94 /* _Atomic.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = _Atomic.swift; path = SwiftTask/_Atomic.swift; sourceTree = ""; }; + 7840488B0C9AC5B861B63FCAB5403828 /* LSHTTPStubURLProtocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPStubURLProtocol.h; path = Nocilla/Hooks/NSURLRequest/LSHTTPStubURLProtocol.h; sourceTree = ""; }; 79BCBBE911B763D6036063E7D32BF5D0 /* Pods_Astro.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Astro.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 79D0014189CEC8B9AE487CDBA2E11C08 /* Quick-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Quick-dummy.m"; sourceTree = ""; }; 7A4A3ECEB9A900D640EF1635D4313478 /* Quick.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7D2A40F21DB871AF2ED94C5485E0AE82 /* Quick.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Quick.h; path = Sources/Quick/Quick.h; sourceTree = ""; }; - 7D6F8C4B96CC18FA8D2EB43CFD0EF551 /* LSHTTPRequestDiff.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSHTTPRequestDiff.m; path = Nocilla/Diff/LSHTTPRequestDiff.m; sourceTree = ""; }; - 7D8AEAB1212407552DD77D55687CC654 /* SwiftTask.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = SwiftTask.modulemap; sourceTree = ""; }; - 7DA8F5655DFE6949CA30A88FD740A18B /* NSString+Nocilla.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+Nocilla.m"; path = "Nocilla/Categories/NSString+Nocilla.m"; sourceTree = ""; }; - 7E54E0A32D638DABAAE1938E085649F5 /* LSHTTPStubURLProtocol.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSHTTPStubURLProtocol.m; path = Nocilla/Hooks/NSURLRequest/LSHTTPStubURLProtocol.m; sourceTree = ""; }; - 7ECC0F2DB79B949AC2A58D6E532E6EEA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 7FF542340635F5EE3FFBD29F13A8B80E /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThanOrEqual.swift; path = Sources/Nimble/Matchers/BeLessThanOrEqual.swift; sourceTree = ""; }; - 80FFBF4F48BE6A503B8C04F7EE392ED1 /* EndWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EndWith.swift; path = Sources/Nimble/Matchers/EndWith.swift; sourceTree = ""; }; - 81B287AAADD69D3417422AE070927E44 /* SwiftTask.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftTask.swift; path = SwiftTask/SwiftTask.swift; sourceTree = ""; }; - 82B9AF145DEC704D066D60237E7CBDBB /* LSMatcheable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSMatcheable.h; path = Nocilla/Matchers/LSMatcheable.h; sourceTree = ""; }; - 846E1484C4DB60242A6128EEC54F4CB4 /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; - 8499C88CD54A0B131F08D126D46C7B9E /* Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-umbrella.h"; sourceTree = ""; }; - 8605659EDD36D55482C9DB2EBE1A8A33 /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; + 7ADE5BA3EB0182FBE990418A9615C789 /* QuickConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickConfiguration.m; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.m; sourceTree = ""; }; + 7BFAAD6E4119D80CD951A46889C39FF3 /* LSHTTPRequestDSLRepresentation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPRequestDSLRepresentation.h; path = Nocilla/DSL/LSHTTPRequestDSLRepresentation.h; sourceTree = ""; }; + 7D3027BB7BD21015332138DF472C6E59 /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; + 7D7294E535E0AFFE83168F74C8237CE8 /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Sources/QuickObjectiveC/DSL/QCKDSL.m; sourceTree = ""; }; + 7F449AE0F19985F86FE24F5498131DD7 /* Functional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Functional.swift; path = Sources/Nimble/Utils/Functional.swift; sourceTree = ""; }; + 80CAF65F2FB9DC5364085BDF485A7B2E /* LSMatcheable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSMatcheable.h; path = Nocilla/Matchers/LSMatcheable.h; sourceTree = ""; }; + 8185CCDB3E4BA12414F4A69C31333C1C /* NSURLRequest+DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLRequest+DSL.m"; path = "Nocilla/Hooks/NSURLRequest/NSURLRequest+DSL.m"; sourceTree = ""; }; + 81E4587E29B77DDD65EF49A919532617 /* CwlCatchException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchException.swift; path = Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift; sourceTree = ""; }; + 82279E55ED2DD732A33040D953BA35E8 /* _StateMachine.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = _StateMachine.swift; path = SwiftTask/_StateMachine.swift; sourceTree = ""; }; + 82B61462E1D7A388F9EBB284336FEEF4 /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickSelectedTestSuiteBuilder.swift; path = Sources/Quick/QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; + 844AA432B11A38D608D923A582868EAC /* LSNSURLHook.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSNSURLHook.m; path = Nocilla/Hooks/NSURLRequest/LSNSURLHook.m; sourceTree = ""; }; + 8478128CE80F1923F00F7ABB963445E3 /* LSRegexMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSRegexMatcher.h; path = Nocilla/Matchers/LSRegexMatcher.h; sourceTree = ""; }; + 852CFF98838A9114714AE2A0FFF79326 /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Nimble.modulemap; sourceTree = ""; }; + 858F7DFCEF515415D21993DCCA024EBD /* SuiteHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SuiteHooks.swift; path = Sources/Quick/Hooks/SuiteHooks.swift; sourceTree = ""; }; 86733F83B392C1F5326987584F7894EA /* Pods-Astro-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Astro-acknowledgements.plist"; sourceTree = ""; }; + 875A07CB2E297794586633B3ECF56B02 /* Freddy.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Freddy.modulemap; sourceTree = ""; }; 877BF995E72F2E8878B207A8C0E9D3D3 /* ReusableView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReusableView.swift; sourceTree = ""; }; - 87A7B61AC940A1FD19E52AE798DB0361 /* Match.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Match.swift; path = Sources/Nimble/Matchers/Match.swift; sourceTree = ""; }; - 8BEAFEE666D85EA288AF1A32B5F69FAF /* ErrorUtility.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ErrorUtility.swift; path = Sources/Quick/ErrorUtility.swift; sourceTree = ""; }; + 87E9235E6C56C463B43776700465412C /* JSONParsing.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONParsing.swift; path = Sources/JSONParsing.swift; sourceTree = ""; }; + 8C2313AA64F552CF741242BF1E85CBD0 /* NSString+Nocilla.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+Nocilla.m"; path = "Nocilla/Categories/NSString+Nocilla.m"; sourceTree = ""; }; 8C76B609C247B56F32515A6D847A8799 /* NibLoadableView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NibLoadableView.swift; sourceTree = ""; }; - 8C829808D86197B50D8483528E538747 /* BeLessThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThan.swift; path = Sources/Nimble/Matchers/BeLessThan.swift; sourceTree = ""; }; - 8E32FEBF48A8DF57EF672939A794ED19 /* Nocilla-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nocilla-umbrella.h"; sourceTree = ""; }; - 8FFD28BC7177BDC4BB2FC768DF2682AF /* Nocilla.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nocilla.xcconfig; sourceTree = ""; }; - 9012B52BD1D693879482A5B36C189E9A /* World+DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "World+DSL.h"; path = "Sources/Quick/DSL/World+DSL.h"; sourceTree = ""; }; - 90458BEF3622BBC8AA13B41F18337D64 /* SwiftTask-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftTask-umbrella.h"; sourceTree = ""; }; - 9108B9F77C510C7B00290542C62100BA /* LSStubResponse.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSStubResponse.h; path = Nocilla/Stubs/LSStubResponse.h; sourceTree = ""; }; + 8C9D6D0877962CE530ECA8A5744423CC /* mach_excServer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mach_excServer.h; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h; sourceTree = ""; }; + 8EDF311A32112DD839DBA94581ADB793 /* LSStubRequest.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSStubRequest.h; path = Nocilla/Stubs/LSStubRequest.h; sourceTree = ""; }; + 9066EF1FF0D9159E9833580D771FB0A4 /* World+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "World+DSL.swift"; path = "Sources/Quick/DSL/World+DSL.swift"; sourceTree = ""; }; + 9168F05B875F16FB7DF6C42AF6C11A11 /* NSURLRequest+LSHTTPRequest.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLRequest+LSHTTPRequest.m"; path = "Nocilla/Hooks/NSURLRequest/NSURLRequest+LSHTTPRequest.m"; sourceTree = ""; }; + 91A97C22294E683A3DB0ECF3D78A2EEE /* AssertionDispatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionDispatcher.swift; path = Sources/Nimble/Adapters/AssertionDispatcher.swift; sourceTree = ""; }; + 91E5E7F9E303328A59D8937676173EB4 /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Sources/Quick/World.swift; sourceTree = ""; }; + 935805BA03F9777174A970A23B24FC18 /* LSStringMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSStringMatcher.h; path = Nocilla/Matchers/LSStringMatcher.h; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 94914DECE29A7AF99992E91B0D97AA9B /* LSRegexMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSRegexMatcher.h; path = Nocilla/Matchers/LSRegexMatcher.h; sourceTree = ""; }; - 94D3C32D2459BA35E799A27B7A23B1D8 /* RaisesException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RaisesException.swift; path = Sources/Nimble/Matchers/RaisesException.swift; sourceTree = ""; }; - 964D61122C046B2ED058B18F3E45CD99 /* BeLogical.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLogical.swift; path = Sources/Nimble/Matchers/BeLogical.swift; sourceTree = ""; }; + 9409D21AB7BE75015C900DAF2455EF17 /* JSONEncodingDetector.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodingDetector.swift; path = Sources/JSONEncodingDetector.swift; sourceTree = ""; }; + 945B1EE88D0505DC2B5B3774DD239515 /* JSONSubscripting.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONSubscripting.swift; path = Sources/JSONSubscripting.swift; sourceTree = ""; }; + 966E7F24628278B30C3E20F7A62009EE /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 96F9B4222FCE15BC3CCD555BF892815B /* NSData+Matcheable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSData+Matcheable.h"; path = "Nocilla/Matchers/NSData+Matcheable.h"; sourceTree = ""; }; 978B87B6A0E09CFE16BB8AFDF35C7524 /* Astro.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Astro.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 981C0D8B96C81FA46A629CACA3982AD6 /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Sources/Nimble/Matchers/BeNil.swift; sourceTree = ""; }; - 99B26536B75CF50E75382CF77F5F68B4 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; - 9A84B567667740EA1C67D0C60C243975 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - 9B831039D667484298E44CC97352C424 /* MatcherFunc.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherFunc.swift; path = Sources/Nimble/Matchers/MatcherFunc.swift; sourceTree = ""; }; - 9BD5AAB63C0A5D8E5DC6EE658F519C3E /* NSRegularExpression+Matcheable.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSRegularExpression+Matcheable.m"; path = "Nocilla/Matchers/NSRegularExpression+Matcheable.m"; sourceTree = ""; }; + 981AADAB498959EE24EEA2174A6B76CE /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9841392E475E61F60E026C0004E8FF26 /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Nimble/Utils/Async.swift; sourceTree = ""; }; + 99BDD588C72B35D7B24CAEC29C01E27B /* LSStubRequestDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSStubRequestDSL.h; path = Nocilla/DSL/LSStubRequestDSL.h; sourceTree = ""; }; + 9A8D751B7AB839DBD8B329F322ACE480 /* LSStubResponseDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSStubResponseDSL.m; path = Nocilla/DSL/LSStubResponseDSL.m; sourceTree = ""; }; + 9C172C4ABEF73E6346779462EF99A24E /* ASIHTTPRequestStub.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ASIHTTPRequestStub.h; path = Nocilla/Hooks/ASIHTTPRequest/ASIHTTPRequestStub.h; sourceTree = ""; }; 9CDEDE7362828202DA806B38A6851006 /* Pods-Astro-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Astro-acknowledgements.markdown"; sourceTree = ""; }; 9D4391E606927C6363300EA5AB52A14E /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9DF421BBCDC5566E84F21FCB2FD3C914 /* NSRegularExpression+Matcheable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSRegularExpression+Matcheable.h"; path = "Nocilla/Matchers/NSRegularExpression+Matcheable.h"; sourceTree = ""; }; - 9EA1CA9ABF02F7181B62A14C63C5E3E6 /* Nocilla.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Nocilla.modulemap; sourceTree = ""; }; - A0D3979768B49843A07A2D912E671C1B /* NimbleXCTestHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleXCTestHandler.swift; path = Sources/Nimble/Adapters/NimbleXCTestHandler.swift; sourceTree = ""; }; - A49E53C084F80BE60CCD84F9475612BF /* LSASIHTTPRequestAdapter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSASIHTTPRequestAdapter.h; path = Nocilla/Hooks/ASIHTTPRequest/LSASIHTTPRequestAdapter.h; sourceTree = ""; }; - A5D2CCF46E1B0888E24EB6F6B0E532B2 /* ThrowError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowError.swift; path = Sources/Nimble/Matchers/ThrowError.swift; sourceTree = ""; }; + 9E6B807B9FCF2B8E6DA445C4AEFE4B21 /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Sources/NimbleObjectiveC/DSL.m; sourceTree = ""; }; + A0B1FD987CBECCD1D237C22E2CB5A489 /* ErrorUtility.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ErrorUtility.swift; path = Sources/Quick/ErrorUtility.swift; sourceTree = ""; }; + A0DD19770937AA27811F726BE7FBCEF8 /* _RecursiveLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = _RecursiveLock.swift; path = SwiftTask/_RecursiveLock.swift; sourceTree = ""; }; + A130D5679AA613D87BFA285866504038 /* CwlCatchException.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlCatchException.m; path = Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m; sourceTree = ""; }; + A1EEFE62DC28EB867B24D2CA0FC31F8D /* CwlDarwinDefinitions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlDarwinDefinitions.swift; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift; sourceTree = ""; }; + A20727403B4316E9CEFC328D40F06026 /* BeLogical.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLogical.swift; path = Sources/Nimble/Matchers/BeLogical.swift; sourceTree = ""; }; + A31A3C5759DD5D6B6E40993423C24B9F /* Nimble-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-prefix.pch"; sourceTree = ""; }; + A346B699DF993A151E729D2F74E3B255 /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; + A4DC6A3D4868032F66FD8EA387523FD6 /* CwlCatchBadInstruction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchBadInstruction.swift; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift; sourceTree = ""; }; + A5B95EAF8208ADAA52D67BEC321D0DB9 /* JSONDecodable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONDecodable.swift; path = Sources/JSONDecodable.swift; sourceTree = ""; }; + A63C40834852E0A17E69166FAC320570 /* Nimble.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.xcconfig; sourceTree = ""; }; A6400E50E54416E65C9CC894AE6EA6F5 /* Pods-AstroTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-AstroTests.debug.xcconfig"; sourceTree = ""; }; - A651FAABB8A4D3C1B0C9EF7C6EEFE8BC /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Sources/Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; - A7976230AA3F6FF83457AAFFCC39F987 /* NSURLRequest+LSHTTPRequest.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLRequest+LSHTTPRequest.h"; path = "Nocilla/Hooks/NSURLRequest/NSURLRequest+LSHTTPRequest.h"; sourceTree = ""; }; + A64BFECD5EC18D2866C2666DFE114488 /* HaveCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HaveCount.swift; path = Sources/Nimble/Matchers/HaveCount.swift; sourceTree = ""; }; + A805BE202B4797337DC796D18209D0D6 /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; + AA03013C5E3F1A694BE38DD7C0747083 /* SwiftTask-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftTask-dummy.m"; sourceTree = ""; }; AB517BF9DAFFCA1BBCC5A0BBCB5B1A73 /* Queue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Queue.swift; sourceTree = ""; }; - AD2511DF7B5065EB4197A4B475803F14 /* Freddy-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Freddy-umbrella.h"; sourceTree = ""; }; AD7D87EC77CCE2F8C0B6D5BD0C78F808 /* Astro-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Astro-umbrella.h"; sourceTree = ""; }; - ADED1DCB14A4876F2717EF125915C71C /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; - B0AD6D8DFD5E95FE41BC3449E756D606 /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Quick.modulemap; sourceTree = ""; }; - B175E85AD5037C0096B0195D51B93034 /* LSHTTPRequest.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPRequest.h; path = Nocilla/Model/LSHTTPRequest.h; sourceTree = ""; }; - B1E3046BF9FB565B47238131ADA779CE /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Sources/Nimble/Matchers/Equal.swift; sourceTree = ""; }; - B1E3F6C9016D030279790B508587F4F5 /* QCKDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QCKDSL.h; path = Sources/Quick/DSL/QCKDSL.h; sourceTree = ""; }; - B4AF807EB366D473D7D2C7B4CAED09FC /* LSMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSMatcher.h; path = Nocilla/Matchers/LSMatcher.h; sourceTree = ""; }; - B5633C1C5B848893399B6AAF45417707 /* JSONEncodable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodable.swift; path = Sources/JSONEncodable.swift; sourceTree = ""; }; - B789B85D4CF17532F49A10E9C5F8D9EC /* Callsite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Callsite.swift; path = Sources/Quick/Callsite.swift; sourceTree = ""; }; - BA18B1B763EDA6EBEFF2B9002A0B4538 /* NSString+QCKSelectorName.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+QCKSelectorName.h"; path = "Sources/Quick/NSString+QCKSelectorName.h"; sourceTree = ""; }; + AE24FB2E57BA499D070F376E45F23F78 /* BeGreaterThanOrEqualTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThanOrEqualTo.swift; path = Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift; sourceTree = ""; }; + B0627B4F18408C0671B224D45223ACDF /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; + B169EB60F7FD48C11D3AB64B0F370D05 /* Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-umbrella.h"; sourceTree = ""; }; + B3965EDA5B84885B983B84B60B4DCE10 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Nimble/DSL.swift; sourceTree = ""; }; + B46E099ABF86787632665AD81615741E /* NimbleEnvironment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleEnvironment.swift; path = Sources/Nimble/Adapters/NimbleEnvironment.swift; sourceTree = ""; }; + B618E80C0317B46EAFE31CB0A2C1EA34 /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAnyOf.swift; path = Sources/Nimble/Matchers/SatisfyAnyOf.swift; sourceTree = ""; }; + B71B6FB2C60F4A4567912243F63DCFCF /* NMBExpectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBExpectation.swift; path = Sources/Nimble/Adapters/NMBExpectation.swift; sourceTree = ""; }; + B7A458E7FC5F0B82EF38CFE791D5F7B5 /* LSHTTPRequest.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPRequest.h; path = Nocilla/Model/LSHTTPRequest.h; sourceTree = ""; }; + B84F0A54CD61C8443E73C338B3CBAD10 /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Sources/Quick/ExampleMetadata.swift; sourceTree = ""; }; + B94F3CBB538ACF449363BC620B9D1CF2 /* NSRegularExpression+Matcheable.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSRegularExpression+Matcheable.m"; path = "Nocilla/Matchers/NSRegularExpression+Matcheable.m"; sourceTree = ""; }; + B9683F7A2924A38D8737ACA6CEC0E4F9 /* ExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleGroup.swift; path = Sources/Quick/ExampleGroup.swift; sourceTree = ""; }; + B9EBBC3BFE00D8E205D6DCCC86AC5CEC /* LSRegexMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSRegexMatcher.m; path = Nocilla/Matchers/LSRegexMatcher.m; sourceTree = ""; }; + BA36334FABC47EC9CC006D2F1E155290 /* LSStubRequest.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSStubRequest.m; path = Nocilla/Stubs/LSStubRequest.m; sourceTree = ""; }; BA3DC2ADF554F5AA1C3D8026782FCDD6 /* Nocilla.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Nocilla.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BA6AF301972A52D836E479EF9F1FF7C6 /* NSURLRequest+DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLRequest+DSL.m"; path = "Nocilla/Hooks/NSURLRequest/NSURLRequest+DSL.m"; sourceTree = ""; }; BAA9EB5EB157F9A95F8CA32853B5297A /* Pods-AstroTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-AstroTests.modulemap"; sourceTree = ""; }; - BC2FBAEA7B0E5E601D62EF9567B9A1D3 /* LSNSURLSessionHook.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSNSURLSessionHook.m; path = Nocilla/Hooks/NSURLSession/LSNSURLSessionHook.m; sourceTree = ""; }; + BAAEEE8218279060AA70291E98351EEA /* RaisesException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RaisesException.swift; path = Sources/Nimble/Matchers/RaisesException.swift; sourceTree = ""; }; BC5AC734889E8683DD50A1C886C6A720 /* Pods-AstroTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-AstroTests.release.xcconfig"; sourceTree = ""; }; BCEEAE40220F26BD4F12EF5023D7A27A /* Pods-Astro-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Astro-resources.sh"; sourceTree = ""; }; + BD7E3F82A2C60BEF0EF0D7C0AE8D0679 /* SwiftTask.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftTask.xcconfig; sourceTree = ""; }; BE458D803D42A46517B26B09327987D1 /* LayoutLabel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LayoutLabel.swift; sourceTree = ""; }; - BECF439ED63F91CEA1E08C23AAE18336 /* PostNotification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PostNotification.swift; path = Sources/Nimble/Matchers/PostNotification.swift; sourceTree = ""; }; - BFC88CB4D2A5E653FE76097D9DCAEA4B /* Freddy-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Freddy-dummy.m"; sourceTree = ""; }; - C003AAA0D11CDA242DD3A3C5AEA13800 /* QuickTestSuite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestSuite.swift; path = Sources/Quick/QuickTestSuite.swift; sourceTree = ""; }; - C110C237F252435D4A36AFB2FBC9847C /* Contain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Contain.swift; path = Sources/Nimble/Matchers/Contain.swift; sourceTree = ""; }; + BE475D46AB0F0A2A238288992D520379 /* AdapterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AdapterProtocols.swift; path = Sources/Nimble/Adapters/AdapterProtocols.swift; sourceTree = ""; }; + BE64E724E8472728D0A669E4678612AB /* XCTestSuite+QuickTestSuiteBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestSuite+QuickTestSuiteBuilder.m"; path = "Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m"; sourceTree = ""; }; + BF797701B06C20F46271081DE11606C9 /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.h; sourceTree = ""; }; + C0C7C0D2C306844D403D2772A877C799 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; + C10614F08AF71818FEE1ADB852161A2F /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Alamofire.modulemap; sourceTree = ""; }; C1BECFF57B794BF840211E16075E843B /* UITableView+AstroGadgets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UITableView+AstroGadgets.swift"; sourceTree = ""; }; - C1D362BF523A9A5F5597677017D9479B /* Closures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Closures.swift; path = Sources/Quick/Hooks/Closures.swift; sourceTree = ""; }; - C37E4B7AD3DFF48E94B070DA3034FAF5 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C1F9F41C0A5BDC42B5117C8F48D1D49D /* EndWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EndWith.swift; path = Sources/Nimble/Matchers/EndWith.swift; sourceTree = ""; }; + C342B64CF1A402B544FB9BD9506DCDFC /* Expectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expectation.swift; path = Sources/Nimble/Expectation.swift; sourceTree = ""; }; + C3E59DBAF321B8E878736D0330A69667 /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; C4A303959AA23940B44A630C103DD53B /* SwiftTask.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftTask.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - C653AAEBCA9E9BA0A57EB9B1CCCE3BAC /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - C662FFC3C402F839DE09A67255100AA2 /* NimbleEnvironment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleEnvironment.swift; path = Sources/Nimble/Adapters/NimbleEnvironment.swift; sourceTree = ""; }; - CA13E6763DFBF5B5D1943920BE89D610 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; + C9DB44AFF48FB129824685D4784BD2DE /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; CA287004F6A3A6417DCAA1D18E5C5BA4 /* Pods-Astro.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Astro.release.xcconfig"; sourceTree = ""; }; - CB1DDBDCCC983F8C7DBAE01E30388C2D /* NMBStringify.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBStringify.h; path = Sources/Nimble/Adapters/ObjectiveC/NMBStringify.h; sourceTree = ""; }; - CDF5736D9D7A92F8E27A62AEF194A5D3 /* Nocilla.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nocilla.h; path = Nocilla/Nocilla.h; sourceTree = ""; }; - CE8D6AF0AB4648D7505A7E1708DC6955 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D04E964F3DB35CE6A55222A2A22E06CA /* DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DSL.h; path = Sources/Nimble/Adapters/ObjectiveC/DSL.h; sourceTree = ""; }; - D057E3DA74D706A5230C38A2A8DA23BA /* NSString+Nocilla.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+Nocilla.h"; path = "Nocilla/Categories/NSString+Nocilla.h"; sourceTree = ""; }; + CB7F6F3D25B1B9326B861E03928584A0 /* LSNSURLSessionHook.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSNSURLSessionHook.h; path = Nocilla/Hooks/NSURLSession/LSNSURLSessionHook.h; sourceTree = ""; }; + CC067C5632AC878871B27F417FA420DA /* LSDataMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSDataMatcher.m; path = Nocilla/Matchers/LSDataMatcher.m; sourceTree = ""; }; + CC3D6E2DF28C598E7E958A840814A3D1 /* Contain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Contain.swift; path = Sources/Nimble/Matchers/Contain.swift; sourceTree = ""; }; + CDC96004790B5821E65D3741680B3705 /* NSData+Nocilla.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSData+Nocilla.h"; path = "Nocilla/Categories/NSData+Nocilla.h"; sourceTree = ""; }; + CE96C0A3E3CE37F13CC60F1580997A77 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; + CEE40FE58AB05BDC8D2B1C6D94CF6265 /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; + CF6DCE81749F167FC67FB446774DE08B /* Nimble.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nimble.h; path = Sources/Nimble/Nimble.h; sourceTree = ""; }; + CFDD470FB1B330C261C9CCC344C15553 /* BeCloseTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeCloseTo.swift; path = Sources/Nimble/Matchers/BeCloseTo.swift; sourceTree = ""; }; + D0A6D3A428910ACA352AD000575EDC3B /* LSStubResponse.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSStubResponse.m; path = Nocilla/Stubs/LSStubResponse.m; sourceTree = ""; }; + D199A3E8156AE7903C0E27E83A5E4E29 /* NSString+Matcheable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+Matcheable.h"; path = "Nocilla/Matchers/NSString+Matcheable.h"; sourceTree = ""; }; D1F318A61A9ABA6904BC70BCB14E8965 /* Freddy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Freddy.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D29BCABEA6BBEBF1CFD4012121C0264B /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; - D39098627F8A63B173221DD4453E1816 /* LSHTTPClientHook.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPClientHook.h; path = Nocilla/Hooks/LSHTTPClientHook.h; sourceTree = ""; }; - D478996036C1B8667C7EC683C038F598 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; - D5346D1563A1A298C988CF5F943C093A /* AssertionDispatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionDispatcher.swift; path = Sources/Nimble/Adapters/AssertionDispatcher.swift; sourceTree = ""; }; - D5663CF2A9C80609B52068DAB5F86C8E /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Sources/Quick/DSL/QCKDSL.m; sourceTree = ""; }; - D599F054E4FE2159DEF282CBE0E31DFA /* LSStubRequestDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSStubRequestDSL.h; path = Nocilla/DSL/LSStubRequestDSL.h; sourceTree = ""; }; + D26AD7AD03D34A166AAEF84BAA2C99FF /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Quick/DSL/DSL.swift; sourceTree = ""; }; + D2C2E4514848A3670BDD18999793E077 /* BeVoid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeVoid.swift; path = Sources/Nimble/Matchers/BeVoid.swift; sourceTree = ""; }; D62BB50E8E9E3730D17977D8D21E7D3E /* NetworkService.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NetworkService.swift; sourceTree = ""; }; - D7E2DFFAF9C53B8870CECB5F7F64089D /* LSNSURLSessionHook.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSNSURLSessionHook.h; path = Nocilla/Hooks/NSURLSession/LSNSURLSessionHook.h; sourceTree = ""; }; - D7F5275B4193E841C3997C48E6EFE373 /* BeAKindOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAKindOf.swift; path = Sources/Nimble/Matchers/BeAKindOf.swift; sourceTree = ""; }; + D7BEF6DE86DF197855B5B6323D725CA3 /* NMBStringify.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBStringify.h; path = Sources/NimbleObjectiveC/NMBStringify.h; sourceTree = ""; }; + D84F37F392EA7B0DB03AE43334470407 /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Sources/Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; + D8F2A7570F3CB4CE926D551CF3787E17 /* LSStubRequestDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSStubRequestDSL.m; path = Nocilla/DSL/LSStubRequestDSL.m; sourceTree = ""; }; D97CC484A2DBEFEC771C1025EBC41CCE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; - DA2117C0F3C548AD5CC636A142BE9CD6 /* QuickSpec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpec.h; path = Sources/Quick/QuickSpec.h; sourceTree = ""; }; - DB998CB4C2F2B143F59EEE0FE9D1274D /* LSHTTPClientHook.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSHTTPClientHook.m; path = Nocilla/Hooks/LSHTTPClientHook.m; sourceTree = ""; }; - DD52F0E3E4688A2CE0A07E04DA911577 /* CurrentTestCaseTracker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CurrentTestCaseTracker.h; path = Sources/Nimble/Adapters/ObjectiveC/CurrentTestCaseTracker.h; sourceTree = ""; }; - DF1351BCB4B31A4D1E8A625409BDF310 /* JSONSerializing.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONSerializing.swift; path = Sources/JSONSerializing.swift; sourceTree = ""; }; - E19A03D34F45F64F617E816C9EFB0D92 /* JSONLiteralConvertible.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONLiteralConvertible.swift; path = Sources/JSONLiteralConvertible.swift; sourceTree = ""; }; + DAC316631C30B0FD1B176F02682F6F97 /* CwlBadInstructionException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlBadInstructionException.swift; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift; sourceTree = ""; }; + DAE714AFA22BCF167146806EF12350E3 /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = Sources/Nimble/Utils/Errors.swift; sourceTree = ""; }; + DD0599BF41155E9A21C6829AADA12EEB /* NSString+Nocilla.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+Nocilla.h"; path = "Nocilla/Categories/NSString+Nocilla.h"; sourceTree = ""; }; + DD0FBEC03BBB6081E42A69AA43A022AB /* NimbleXCTestHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleXCTestHandler.swift; path = Sources/Nimble/Adapters/NimbleXCTestHandler.swift; sourceTree = ""; }; + DD69344463C6D11B4E7516C0AFFF745E /* Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-umbrella.h"; sourceTree = ""; }; + E01777C7EE471B814CD8F813DBBF0851 /* LSHTTPResponse.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPResponse.h; path = Nocilla/Model/LSHTTPResponse.h; sourceTree = ""; }; + E100A8FFB7414CC7EB52FAD79C733349 /* Nocilla-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nocilla-prefix.pch"; sourceTree = ""; }; + E2416C6003EDE2F2F23F9A0A29A2C9C7 /* LSHTTPBody.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPBody.h; path = Nocilla/Model/LSHTTPBody.h; sourceTree = ""; }; + E272E2EF71853703F3CDA826A479D7D4 /* LSHTTPClientHook.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSHTTPClientHook.m; path = Nocilla/Hooks/LSHTTPClientHook.m; sourceTree = ""; }; E2FDBBD7A1FA9E8D7313E2D8C7CB1083 /* Pods-AstroTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-AstroTests-acknowledgements.markdown"; sourceTree = ""; }; - E3B021591B3A1EAA8BCA339C18A3E219 /* HaveCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HaveCount.swift; path = Sources/Nimble/Matchers/HaveCount.swift; sourceTree = ""; }; - E3C934F55950F055755F2FB5E331DA9B /* SwiftTask.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftTask.xcconfig; sourceTree = ""; }; - E3D5F8E522B317FBBEBB08F1E2BF775F /* JSONParsing.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONParsing.swift; path = Sources/JSONParsing.swift; sourceTree = ""; }; E408DAA6184E7EAB179A403F5D1274DA /* NetworkServiceLogger.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NetworkServiceLogger.swift; sourceTree = ""; }; E4D54383DE9F48DD36B48F77E57BF01E /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; - E542258439D60CFDE6C1F7CBFB9C9D53 /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; - E54303E2686DF60500CC0A595F9B66D0 /* Stringers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stringers.swift; path = Sources/Nimble/Utils/Stringers.swift; sourceTree = ""; }; - E5C600D0851A3EFA2A461D6559885924 /* Freddy.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Freddy.xcconfig; sourceTree = ""; }; - E64F5CCF316D56E2C07425CC0D9DCB90 /* NSString+Matcheable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+Matcheable.h"; path = "Nocilla/Matchers/NSString+Matcheable.h"; sourceTree = ""; }; - E67AD8E1BA3D5AE433588B5D864123CA /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Sources/Quick/Configuration/QuickConfiguration.h; sourceTree = ""; }; - EC674E21556741A41DAFF6F06A257444 /* String+FileName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+FileName.swift"; path = "Sources/Quick/String+FileName.swift"; sourceTree = ""; }; - EC68F3FFC9D47A8F658D2289435BE266 /* LSStubRequest.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSStubRequest.m; path = Nocilla/Stubs/LSStubRequest.m; sourceTree = ""; }; - EE7F05482CE22FA4A2F9709C72C29F2F /* Nocilla-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nocilla-prefix.pch"; sourceTree = ""; }; + E69B476F4410F0F29153127554FEB86D /* Nocilla-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nocilla-umbrella.h"; sourceTree = ""; }; + E74F02D3DD6557902CB407979D25D981 /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Sources/Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; + E750B2DF819850FEBEBB5DD0D67C80AC /* Nocilla.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nocilla.xcconfig; sourceTree = ""; }; + E949E5FAFED6D1CEB3FE99EABFDD821F /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; + EA00E816D001F040DB4584D509447162 /* JSONParser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONParser.swift; path = Sources/JSONParser.swift; sourceTree = ""; }; + EA9B9194A62FB724B6DEAA468282686C /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; + EAC16159CA27E2B96D85107C58D896DA /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; + EAF3FE277629AA2DE13A72DCA72E8FC5 /* Closures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Closures.swift; path = Sources/Quick/Hooks/Closures.swift; sourceTree = ""; }; + EB9EF23597F63D1D36ACFBD943D656E0 /* Quick.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Quick.h; path = Sources/QuickObjectiveC/Quick.h; sourceTree = ""; }; + ECC26F252B23C600F903B093D4B41AF5 /* CwlCatchException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlCatchException.h; path = Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h; sourceTree = ""; }; + ED3851D99ECE4294DBA48BEB676603C6 /* SwiftTask.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftTask.swift; path = SwiftTask/SwiftTask.swift; sourceTree = ""; }; + EDDF3FCF975C596DBCF5B852F422CF3C /* Freddy.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Freddy.xcconfig; sourceTree = ""; }; EE8F0CC5B62EC037D08D2A44AA5CABBA /* Pods-AstroTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-AstroTests-resources.sh"; sourceTree = ""; }; - EEF30250E18C7F3BC7A5DC0599B4CC6B /* NSString+Matcheable.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+Matcheable.m"; path = "Nocilla/Matchers/NSString+Matcheable.m"; sourceTree = ""; }; - EFDC167F51D907DA3C0BB648440C27F7 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Quick/DSL/DSL.swift; sourceTree = ""; }; - F1A19438A8C71AB3785FC2728ACF7D35 /* LSStringMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSStringMatcher.h; path = Nocilla/Matchers/LSStringMatcher.h; sourceTree = ""; }; - F2A3A410983B0ACAC5571383B99CAB2D /* Nocilla-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nocilla-dummy.m"; sourceTree = ""; }; - F2B3E7999D62C38A0ADE7FC63494B885 /* SuiteHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SuiteHooks.swift; path = Sources/Quick/Hooks/SuiteHooks.swift; sourceTree = ""; }; - F2C900ACA8C6D4A9FD8AC095F0B30764 /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = Sources/Nimble/Utils/Errors.swift; sourceTree = ""; }; - F2EED208FA3C8DC3E0FF81F145DF3C84 /* LSHTTPRequestDSLRepresentation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSHTTPRequestDSLRepresentation.m; path = Nocilla/DSL/LSHTTPRequestDSLRepresentation.m; sourceTree = ""; }; - F313245E710FF08DD42E94F62560C21A /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickSelectedTestSuiteBuilder.swift; path = Sources/Quick/QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; + EF183B545724D34251F28485042C0290 /* NSString+Matcheable.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+Matcheable.m"; path = "Nocilla/Matchers/NSString+Matcheable.m"; sourceTree = ""; }; + F04ACF71FF4069A167FB9CE9E04FCB80 /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Sources/Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; + F10D944251761992660168C862F51494 /* SwiftTask.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = SwiftTask.modulemap; sourceTree = ""; }; + F20DA91294939D19DFFEB163CA13864F /* JSONSerializing.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONSerializing.swift; path = Sources/JSONSerializing.swift; sourceTree = ""; }; + F3507870BD8CED56783352123A181B21 /* QuickTestSuite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestSuite.swift; path = Sources/Quick/QuickTestSuite.swift; sourceTree = ""; }; + F35887722351255C405176EC37414175 /* LSHTTPRequestDiff.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSHTTPRequestDiff.h; path = Nocilla/Diff/LSHTTPRequestDiff.h; sourceTree = ""; }; F511D0AF6267ABF4691C1EDE99FB659D /* EnumCountable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EnumCountable.swift; sourceTree = ""; }; - F5395BBA7A071CBF3AFE75B515C61368 /* BeCloseTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeCloseTo.swift; path = Sources/Nimble/Matchers/BeCloseTo.swift; sourceTree = ""; }; - F6190D3DCC555A20AEBF4FE28A41C942 /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; - F63BB0F4518DCE933B9046B940D5A9B1 /* LSStringMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSStringMatcher.m; path = Nocilla/Matchers/LSStringMatcher.m; sourceTree = ""; }; F89A3E458EC43DC935269FB7DD771D86 /* Pods_AstroTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AstroTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F952371ED40FD33BA4B9D7AE9F6420AF /* Freddy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Freddy.h; path = Sources/Freddy.h; sourceTree = ""; }; - FAA131598253CE58BF21F626715CEF42 /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Sources/Nimble/FailureMessage.swift; sourceTree = ""; }; + F8F61D5FC86AB2B111B34109004B6577 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; + FA81FEE04491C2D883B23DA893F051F5 /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSBundle+CurrentTestBundle.swift"; path = "Sources/Quick/NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; + FA98DAF2AF9128FF34FDC07E582BD369 /* Nocilla-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nocilla-dummy.m"; sourceTree = ""; }; + FB36CE291992844FE7A45419C0548A38 /* ASIHTTPRequestStub.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ASIHTTPRequestStub.m; path = Nocilla/Hooks/ASIHTTPRequest/ASIHTTPRequestStub.m; sourceTree = ""; }; + FBDECF0A766E709C9FB6C2DC404AA7B8 /* NSRegularExpression+Matcheable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSRegularExpression+Matcheable.h"; path = "Nocilla/Matchers/NSRegularExpression+Matcheable.h"; sourceTree = ""; }; FC4B28D110AB0D170E2F97D415B8E6E9 /* Pods-Astro-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Astro-dummy.m"; sourceTree = ""; }; + FC4ED934BA3A8419AC4EF8C3C1E71579 /* LSASIHTTPRequestHook.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = LSASIHTTPRequestHook.m; path = Nocilla/Hooks/ASIHTTPRequest/LSASIHTTPRequestHook.m; sourceTree = ""; }; + FC9D596C715B462C4CC0DDEDD2CEAFE7 /* NSData+Nocilla.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSData+Nocilla.m"; path = "Nocilla/Categories/NSData+Nocilla.m"; sourceTree = ""; }; FCA00C1B06719055DFF92DF876BB1CB6 /* Pods-Astro.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-Astro.modulemap"; sourceTree = ""; }; FCE3C6A2429004B3D14090204CC6CC53 /* Nimble.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FCF9E52F635C732096391AFDC37DBD19 /* HooksPhase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HooksPhase.swift; path = Sources/Quick/Hooks/HooksPhase.swift; sourceTree = ""; }; FDD291DBB3F60DEB32D3F9C5F08524ED /* UIColor+AstroGadgets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIColor+AstroGadgets.swift"; sourceTree = ""; }; FDE84FF0D7B9663C062BD966122BCA44 /* SwiftTask.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftTask.framework; sourceTree = BUILT_PRODUCTS_DIR; }; FE41FE08DA43BEAD289E4EED605F0730 /* Pods-AstroTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-AstroTests-frameworks.sh"; sourceTree = ""; }; - FED3C10BB4D401609B8331544CF4494B /* LSASIHTTPRequestHook.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LSASIHTTPRequestHook.h; path = Nocilla/Hooks/ASIHTTPRequest/LSASIHTTPRequestHook.h; sourceTree = ""; }; - FEE475B600741EFE0262B7D1DCC75083 /* MatchError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatchError.swift; path = Sources/Nimble/Matchers/MatchError.swift; sourceTree = ""; }; FF14E7E64D23B07812BAF0C10D193605 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - FF8967CDBD8BA88C5396C98EDDE31851 /* BeAnInstanceOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAnInstanceOf.swift; path = Sources/Nimble/Matchers/BeAnInstanceOf.swift; sourceTree = ""; }; + FF8FE74C450E10853DF2A94F517E686B /* Quick.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.xcconfig; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 050B68EC615B591FDA5D0B855E697228 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7070E1BDFFD9D6D40C6ED465BD5C58CB /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 1CFB8EC27F7DFF390441337C21B67AB8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -677,9 +691,127 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + F8B360D4AAEBF44BCDC02A9A8054AC7B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E2AF82FAED429162D2F8C13802029210 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 0206F6B4B682A5EEF8E6B598E68DE8DD /* Quick */ = { + isa = PBXGroup; + children = ( + 685B33750C734FE31B3CFC8680BBC514 /* Callsite.swift */, + EAF3FE277629AA2DE13A72DCA72E8FC5 /* Closures.swift */, + 20AEC20748F1663BACBD6FD36F120697 /* Configuration.swift */, + D26AD7AD03D34A166AAEF84BAA2C99FF /* DSL.swift */, + A0B1FD987CBECCD1D237C22E2CB5A489 /* ErrorUtility.swift */, + 35FEDC55395B40D8E6BDE2EA52A6FC36 /* Example.swift */, + B9683F7A2924A38D8737ACA6CEC0E4F9 /* ExampleGroup.swift */, + 38704C04F766AD087FAC725691D3AE02 /* ExampleHooks.swift */, + B84F0A54CD61C8443E73C338B3CBAD10 /* ExampleMetadata.swift */, + 56262CD3940BBF6860630568948BAE7C /* Filter.swift */, + FCF9E52F635C732096391AFDC37DBD19 /* HooksPhase.swift */, + FA81FEE04491C2D883B23DA893F051F5 /* NSBundle+CurrentTestBundle.swift */, + 43B1FD22744524331F663AF17391C873 /* NSString+QCKSelectorName.h */, + 071EF70F48ED17641B729D4449E52994 /* NSString+QCKSelectorName.m */, + 5348EC8A28239000A63C8FF4239D4DE6 /* QCKDSL.h */, + 7D7294E535E0AFFE83168F74C8237CE8 /* QCKDSL.m */, + EB9EF23597F63D1D36ACFBD943D656E0 /* Quick.h */, + BF797701B06C20F46271081DE11606C9 /* QuickConfiguration.h */, + 7ADE5BA3EB0182FBE990418A9615C789 /* QuickConfiguration.m */, + 82B61462E1D7A388F9EBB284336FEEF4 /* QuickSelectedTestSuiteBuilder.swift */, + 1C3A5D3BAC460B45231D375C5EDE02C6 /* QuickSpec.h */, + 06D5EF8B45FE60AC6EDAC8FCAEACD8DE /* QuickSpec.m */, + F3507870BD8CED56783352123A181B21 /* QuickTestSuite.swift */, + 3C722BFE51DE5EC90209D19ECD8540E1 /* String+FileName.swift */, + 858F7DFCEF515415D21993DCCA024EBD /* SuiteHooks.swift */, + 420F4BAB4F683D03FBFA5AD7938B9AD1 /* World.h */, + 91E5E7F9E303328A59D8937676173EB4 /* World.swift */, + 02F144FF0E29EE422B0A2B133E88D247 /* World+DSL.h */, + 9066EF1FF0D9159E9833580D771FB0A4 /* World+DSL.swift */, + BE64E724E8472728D0A669E4678612AB /* XCTestSuite+QuickTestSuiteBuilder.m */, + CFF7981B98BD03A5C5948D76269225D5 /* Support Files */, + ); + path = Quick; + sourceTree = ""; + }; + 03C15821879E7897C84352039CBB7C9A /* Nimble */ = { + isa = PBXGroup; + children = ( + BE475D46AB0F0A2A238288992D520379 /* AdapterProtocols.swift */, + 5470804D3E23BD6A0573E0A40894EDB2 /* AllPass.swift */, + 91A97C22294E683A3DB0ECF3D78A2EEE /* AssertionDispatcher.swift */, + E74F02D3DD6557902CB407979D25D981 /* AssertionRecorder.swift */, + 9841392E475E61F60E026C0004E8FF26 /* Async.swift */, + 22810EF07F547FE210012C8D3998B21B /* AsyncMatcherWrapper.swift */, + 4F6BE2A247593D064F2152B0CA22C31C /* BeAKindOf.swift */, + 271683EE071FE4B5A83D3567AC06B69E /* BeAnInstanceOf.swift */, + CFDD470FB1B330C261C9CCC344C15553 /* BeCloseTo.swift */, + 0528BA73A704BD372344FFEC1B84183A /* BeEmpty.swift */, + D84F37F392EA7B0DB03AE43334470407 /* BeginWith.swift */, + F04ACF71FF4069A167FB9CE9E04FCB80 /* BeGreaterThan.swift */, + AE24FB2E57BA499D070F376E45F23F78 /* BeGreaterThanOrEqualTo.swift */, + 1F8463461A3040238873251F0DA89F51 /* BeIdenticalTo.swift */, + 6935ECADFECDEBD203811BF6D9285D30 /* BeLessThan.swift */, + 45F0E9C963167B5C1650CFD3EA7C4DF0 /* BeLessThanOrEqual.swift */, + A20727403B4316E9CEFC328D40F06026 /* BeLogical.swift */, + 76F8FAE11BD3A5684FA3B42290AE2A65 /* BeNil.swift */, + D2C2E4514848A3670BDD18999793E077 /* BeVoid.swift */, + CC3D6E2DF28C598E7E958A840814A3D1 /* Contain.swift */, + 151E5DE6EE45E6269ADCC6553AF00E79 /* CurrentTestCaseTracker.h */, + DAC316631C30B0FD1B176F02682F6F97 /* CwlBadInstructionException.swift */, + 042869A08CF3409EC2730F95F519A0F2 /* CwlCatchBadInstruction.h */, + 11D1BE32ADBFF181084FAEA58AD60F2E /* CwlCatchBadInstruction.m */, + A4DC6A3D4868032F66FD8EA387523FD6 /* CwlCatchBadInstruction.swift */, + ECC26F252B23C600F903B093D4B41AF5 /* CwlCatchException.h */, + A130D5679AA613D87BFA285866504038 /* CwlCatchException.m */, + 81E4587E29B77DDD65EF49A919532617 /* CwlCatchException.swift */, + A1EEFE62DC28EB867B24D2CA0FC31F8D /* CwlDarwinDefinitions.swift */, + 018AC161D8915DFDD564EFA2273B3987 /* DSL.h */, + 9E6B807B9FCF2B8E6DA445C4AEFE4B21 /* DSL.m */, + B3965EDA5B84885B983B84B60B4DCE10 /* DSL.swift */, + 395D8F5906B8920E261C2EB3D176D9F5 /* DSL+Wait.swift */, + C1F9F41C0A5BDC42B5117C8F48D1D49D /* EndWith.swift */, + 1B74629F50D82A8DC2A0634DF371A060 /* Equal.swift */, + DAE714AFA22BCF167146806EF12350E3 /* Errors.swift */, + C342B64CF1A402B544FB9BD9506DCDFC /* Expectation.swift */, + 09C8AE3C7337CCBD768F964F383CBC0D /* Expression.swift */, + 56456BE95901992704AB3306530F35D9 /* FailureMessage.swift */, + 7F449AE0F19985F86FE24F5498131DD7 /* Functional.swift */, + A64BFECD5EC18D2866C2666DFE114488 /* HaveCount.swift */, + 215A122F10C07D394FB8D890B27EBECC /* mach_excServer.c */, + 8C9D6D0877962CE530ECA8A5744423CC /* mach_excServer.h */, + 72A14CE0AF1C91349D552E053714D575 /* Match.swift */, + 23E606DCE7B953825CBCE1A0382D13D8 /* MatcherFunc.swift */, + 32ED0E935E3BAF4A9A0EAAA12E4A714E /* MatcherProtocols.swift */, + 63CAF6B422DA057CB9D7B2F771C5C1DD /* MatchError.swift */, + CF6DCE81749F167FC67FB446774DE08B /* Nimble.h */, + B46E099ABF86787632665AD81615741E /* NimbleEnvironment.swift */, + DD0FBEC03BBB6081E42A69AA43A022AB /* NimbleXCTestHandler.swift */, + 0686698A558C4EBF75CBEAFED937E9FF /* NMBExceptionCapture.h */, + 1EF8825FDA61EEE048759EE17D53E449 /* NMBExceptionCapture.m */, + B71B6FB2C60F4A4567912243F63DCFCF /* NMBExpectation.swift */, + 00F11A8B3CAF699F2B925AA442CC06D8 /* NMBObjCMatcher.swift */, + D7BEF6DE86DF197855B5B6323D725CA3 /* NMBStringify.h */, + 1DFF530B8460BE93B736F122B6826654 /* NMBStringify.m */, + 2E5401E977AD5FDBBACE2190887C0E6F /* PostNotification.swift */, + BAAEEE8218279060AA70291E98351EEA /* RaisesException.swift */, + B618E80C0317B46EAFE31CB0A2C1EA34 /* SatisfyAnyOf.swift */, + 1B31B1D71EFA9C9F6BC2B28D6ED7A6B8 /* SourceLocation.swift */, + 3FBE565E9FFFBC9F4BFA295826DEE17F /* Stringers.swift */, + 22C9025EE20B48DF9D5171FD0DF74CC9 /* ThrowAssertion.swift */, + 41B13CF9F52B5FF0B725DD6AA4D6315F /* ThrowError.swift */, + 273AFE09E29D054E989C27C406F8407B /* XCTestObservationCenter+Register.m */, + 6DDBB88BF7BCB97D75B4DECE96B6552D /* Support Files */, + ); + path = Nimble; + sourceTree = ""; + }; 04BFEDE7A2E235BC7AC856979F0B7AB3 /* Utils */ = { isa = PBXGroup; children = ( @@ -716,19 +848,6 @@ path = Logging; sourceTree = ""; }; - 1ABE14C1EB7548408290F060B1FD6F68 /* Pods */ = { - isa = PBXGroup; - children = ( - D867CD60D15C30C7027114087265AB6C /* Alamofire */, - 41700AC12E751F80A5A2A7E6FBE11341 /* Freddy */, - 228647CEE3FEA868B8EA7DF5D4193883 /* Nimble */, - 7A612BB7D2167E755F0F6802D5B0935A /* Nocilla */, - B170A0E5D81E80C6E35BEBE82480E604 /* Quick */, - 4F683E4414F333B964F890B83D566FF9 /* SwiftTask */, - ); - name = Pods; - sourceTree = ""; - }; 1C28C13A1BB5272BFE90AFD378132CDE /* Targets Support Files */ = { isa = PBXGroup; children = ( @@ -738,65 +857,29 @@ name = "Targets Support Files"; sourceTree = ""; }; - 228647CEE3FEA868B8EA7DF5D4193883 /* Nimble */ = { + 1D4A9A77F80E987B47D1D3DFCEAD733B /* Alamofire */ = { isa = PBXGroup; children = ( - 2684360A9E22977194A9F7BAC3580666 /* AdapterProtocols.swift */, - 2F9A86574F2A7071B2058EF9649F9F4F /* AllPass.swift */, - D5346D1563A1A298C988CF5F943C093A /* AssertionDispatcher.swift */, - A651FAABB8A4D3C1B0C9EF7C6EEFE8BC /* AssertionRecorder.swift */, - 5B337EA4DB32DBBF01A45AD2DA159EEB /* Async.swift */, - 396035A274BE85E2A79A14557F188DE9 /* AsyncMatcherWrapper.swift */, - D7F5275B4193E841C3997C48E6EFE373 /* BeAKindOf.swift */, - FF8967CDBD8BA88C5396C98EDDE31851 /* BeAnInstanceOf.swift */, - F5395BBA7A071CBF3AFE75B515C61368 /* BeCloseTo.swift */, - 72C14B4911E5A56CEF192041CD902F42 /* BeEmpty.swift */, - 6C2C94ED0D97068FC1CCAFB424107CBF /* BeginWith.swift */, - 1CDCD82A818E6E82200A01860040B5C7 /* BeGreaterThan.swift */, - 4E35D5AB5C88B5BA0D575B5E6440C639 /* BeGreaterThanOrEqualTo.swift */, - 4DA20E139146E66B853599325D0EB814 /* BeIdenticalTo.swift */, - 8C829808D86197B50D8483528E538747 /* BeLessThan.swift */, - 7FF542340635F5EE3FFBD29F13A8B80E /* BeLessThanOrEqual.swift */, - 964D61122C046B2ED058B18F3E45CD99 /* BeLogical.swift */, - 981C0D8B96C81FA46A629CACA3982AD6 /* BeNil.swift */, - 6B67C20266A4C50A1C347EA85C1B8814 /* BeVoid.swift */, - C110C237F252435D4A36AFB2FBC9847C /* Contain.swift */, - DD52F0E3E4688A2CE0A07E04DA911577 /* CurrentTestCaseTracker.h */, - D04E964F3DB35CE6A55222A2A22E06CA /* DSL.h */, - 53A987C36D5AF811928370956EDA6F7B /* DSL.m */, - 213754F1822D3389F0626B85751B244C /* DSL.swift */, - 6A2033086B25E850845B6A7EF6B59A56 /* DSL+Wait.swift */, - 80FFBF4F48BE6A503B8C04F7EE392ED1 /* EndWith.swift */, - B1E3046BF9FB565B47238131ADA779CE /* Equal.swift */, - F2C900ACA8C6D4A9FD8AC095F0B30764 /* Errors.swift */, - 1AC20E208201C4090E34097C86AA98A7 /* Expectation.swift */, - 17937D695835B2FAFA87680EBD2DDEEB /* Expression.swift */, - FAA131598253CE58BF21F626715CEF42 /* FailureMessage.swift */, - 213513F3A16D2DF21DBB9B616F107E33 /* Functional.swift */, - E3B021591B3A1EAA8BCA339C18A3E219 /* HaveCount.swift */, - 87A7B61AC940A1FD19E52AE798DB0361 /* Match.swift */, - 9B831039D667484298E44CC97352C424 /* MatcherFunc.swift */, - 1E02FD2E676BD9EBE51D94DD72A393CA /* MatcherProtocols.swift */, - FEE475B600741EFE0262B7D1DCC75083 /* MatchError.swift */, - 4029957B3F8655025D5D20920ED34752 /* Nimble.h */, - C662FFC3C402F839DE09A67255100AA2 /* NimbleEnvironment.swift */, - A0D3979768B49843A07A2D912E671C1B /* NimbleXCTestHandler.swift */, - 764D110FFFCD4147FAB007F5CC15C39E /* NMBExceptionCapture.h */, - 75556B87747C12614320AAF5CB884BEF /* NMBExceptionCapture.m */, - 3D0153C0D9E5372AD43FC81C52526302 /* NMBExpectation.swift */, - 6496FB4F8515747A0F9E50DC22B36E11 /* NMBObjCMatcher.swift */, - CB1DDBDCCC983F8C7DBAE01E30388C2D /* NMBStringify.h */, - 0381DB03287A652D133655CC87C0F3EC /* NMBStringify.m */, - BECF439ED63F91CEA1E08C23AAE18336 /* PostNotification.swift */, - 94D3C32D2459BA35E799A27B7A23B1D8 /* RaisesException.swift */, - 7743BBD05243D52E271CDAD63F5B989A /* SatisfyAnyOf.swift */, - 57F88C7E49227690DB30C290A9CEADBF /* SourceLocation.swift */, - E54303E2686DF60500CC0A595F9B66D0 /* Stringers.swift */, - A5D2CCF46E1B0888E24EB6F6B0E532B2 /* ThrowError.swift */, - 334E9C3CECC5351EE96F55569E1FCEDD /* XCTestObservationCenter+Register.m */, - F36D0E4A5697BD7D226DFD4E17F24975 /* Support Files */, + A805BE202B4797337DC796D18209D0D6 /* AFError.swift */, + B0627B4F18408C0671B224D45223ACDF /* Alamofire.swift */, + 6EBEB6366B5924DB3BA1BC3C15ADAFED /* DispatchQueue+Alamofire.swift */, + EAC16159CA27E2B96D85107C58D896DA /* MultipartFormData.swift */, + 73E8F0BF0AB8AC6DA3C9D02FABA632B8 /* NetworkReachabilityManager.swift */, + 45E2CDCB48C2960B6288675AF1FF0E5B /* Notifications.swift */, + A346B699DF993A151E729D2F74E3B255 /* ParameterEncoding.swift */, + 5BD4F43195ADC43288EC4E5B87B12A78 /* Request.swift */, + 5214EA8CA0429CA4A308C2FC112F5541 /* Response.swift */, + F8F61D5FC86AB2B111B34109004B6577 /* ResponseSerialization.swift */, + CE96C0A3E3CE37F13CC60F1580997A77 /* Result.swift */, + C3E59DBAF321B8E878736D0330A69667 /* ServerTrustPolicy.swift */, + 482DF7435CAE0FA6405497EC0EF2D288 /* SessionDelegate.swift */, + 7D3027BB7BD21015332138DF472C6E59 /* SessionManager.swift */, + EA9B9194A62FB724B6DEAA468282686C /* TaskDelegate.swift */, + CEE40FE58AB05BDC8D2B1C6D94CF6265 /* Timeline.swift */, + C0C7C0D2C306844D403D2772A877C799 /* Validation.swift */, + 66182482A619E3EB2659B415DA3973D2 /* Support Files */, ); - path = Nimble; + path = Alamofire; sourceTree = ""; }; 349551D5BC8FCB15D04980F64473FF69 /* Astro */ = { @@ -813,6 +896,19 @@ path = ..; sourceTree = ""; }; + 3E8E62510B0A1F03F360EE3F45F37F5A /* Pods */ = { + isa = PBXGroup; + children = ( + 1D4A9A77F80E987B47D1D3DFCEAD733B /* Alamofire */, + 58100A49A6703861D66F2CCDB6ACACE7 /* Freddy */, + 03C15821879E7897C84352039CBB7C9A /* Nimble */, + 8C01658DB077D597E6247CC9DE0C8FA9 /* Nocilla */, + 0206F6B4B682A5EEF8E6B598E68DE8DD /* Quick */, + 520EF1863FEFD3A2AD80A4F91B3A7675 /* SwiftTask */, + ); + name = Pods; + sourceTree = ""; + }; 3F45A6F7E3C1435AE300D1848F2ECF98 /* Astro */ = { isa = PBXGroup; children = ( @@ -829,36 +925,32 @@ path = Astro; sourceTree = ""; }; - 41700AC12E751F80A5A2A7E6FBE11341 /* Freddy */ = { + 520EF1863FEFD3A2AD80A4F91B3A7675 /* SwiftTask */ = { isa = PBXGroup; children = ( - F952371ED40FD33BA4B9D7AE9F6420AF /* Freddy.h */, - 0AD11791D91B1E8BE6A15A123CCD5ABB /* JSON.swift */, - 368ABCA024EEAE1AF88A306FFE3B6E86 /* JSONDecodable.swift */, - B5633C1C5B848893399B6AAF45417707 /* JSONEncodable.swift */, - 4C47C4F0D9B36F88D240C445B404CA9A /* JSONEncodingDetector.swift */, - E19A03D34F45F64F617E816C9EFB0D92 /* JSONLiteralConvertible.swift */, - 49C52E23E4263893DB7947504A16DF2C /* JSONParser.swift */, - E3D5F8E522B317FBBEBB08F1E2BF775F /* JSONParsing.swift */, - DF1351BCB4B31A4D1E8A625409BDF310 /* JSONSerializing.swift */, - 4BE2DE3A06C049929FED7B6EA5BD77C1 /* JSONSubscripting.swift */, - 822070FF93E8BE3A972672E64B3BC794 /* Support Files */, + 780A2D1F0CF49C25B2CB9CC25C6A5B94 /* _Atomic.swift */, + A0DD19770937AA27811F726BE7FBCEF8 /* _RecursiveLock.swift */, + 82279E55ED2DD732A33040D953BA35E8 /* _StateMachine.swift */, + 08C47E51BAB892EFC84CCBF988BD7503 /* Cancellable.swift */, + 20223D11D9ABF2E670D1730866CBBEF7 /* SwiftTask.h */, + ED3851D99ECE4294DBA48BEB676603C6 /* SwiftTask.swift */, + C2EF919F5CF86D0C80CF46E9DA798C51 /* Support Files */, ); - path = Freddy; + path = SwiftTask; sourceTree = ""; }; - 4F683E4414F333B964F890B83D566FF9 /* SwiftTask */ = { + 53ACF8C8AD0FFF296662CC4A1CE33C68 /* Support Files */ = { isa = PBXGroup; children = ( - 78D81935F9929A6DFE89C95A30163613 /* _Atomic.swift */, - 58FC63C8CBFD7E521F24241853DF5C14 /* _RecursiveLock.swift */, - 3EF364BB6F5D1DB9851B6BFC10060F2F /* _StateMachine.swift */, - 1ED1CA7206A0394D9BE404F9CFCD177D /* Cancellable.swift */, - 6C3BAC8C7B9A07799DE46B602D115B02 /* SwiftTask.h */, - 81B287AAADD69D3417422AE070927E44 /* SwiftTask.swift */, - F7B02BA557E8C32528CFDA17640BE675 /* Support Files */, + 875A07CB2E297794586633B3ECF56B02 /* Freddy.modulemap */, + EDDF3FCF975C596DBCF5B852F422CF3C /* Freddy.xcconfig */, + 419F563941A11F843C9901ABDD72EFD1 /* Freddy-dummy.m */, + 3B3577B8CF40135FD528ADC3A0961A46 /* Freddy-prefix.pch */, + 1E87CE6D3EE2DEDD47199194199203F0 /* Freddy-umbrella.h */, + 56F3D11291D828E7F960D87FB3B3BD04 /* Info.plist */, ); - path = SwiftTask; + name = "Support Files"; + path = "../Target Support Files/Freddy"; sourceTree = ""; }; 553B9FEDDC912F69E8DB79B8A37EBF20 /* Networking */ = { @@ -877,6 +969,24 @@ path = Astro; sourceTree = ""; }; + 58100A49A6703861D66F2CCDB6ACACE7 /* Freddy */ = { + isa = PBXGroup; + children = ( + 55F0CC0D1DAD2512CFF1D6CFEC24AF43 /* Freddy.h */, + 43AFF0AF2C6A3B6953AA60F44B6C74E5 /* JSON.swift */, + A5B95EAF8208ADAA52D67BEC321D0DB9 /* JSONDecodable.swift */, + 19AD8BD7C876614E7500B225BFEDEA4D /* JSONEncodable.swift */, + 9409D21AB7BE75015C900DAF2455EF17 /* JSONEncodingDetector.swift */, + 16D6F9AEC686EC3BBF1F9BA7D43A92B6 /* JSONLiteralConvertible.swift */, + EA00E816D001F040DB4584D509447162 /* JSONParser.swift */, + 87E9235E6C56C463B43776700465412C /* JSONParsing.swift */, + F20DA91294939D19DFFEB163CA13864F /* JSONSerializing.swift */, + 945B1EE88D0505DC2B5B3774DD239515 /* JSONSubscripting.swift */, + 53ACF8C8AD0FFF296662CC4A1CE33C68 /* Support Files */, + ); + path = Freddy; + sourceTree = ""; + }; 653776701E21D26AEC22777B5FE9672B /* Security */ = { isa = PBXGroup; children = ( @@ -885,6 +995,34 @@ name = Security; sourceTree = ""; }; + 66182482A619E3EB2659B415DA3973D2 /* Support Files */ = { + isa = PBXGroup; + children = ( + C10614F08AF71818FEE1ADB852161A2F /* Alamofire.modulemap */, + C9DB44AFF48FB129824685D4784BD2DE /* Alamofire.xcconfig */, + 3CD687773372933FE0C29624852008F2 /* Alamofire-dummy.m */, + 439BCCFCC519BD3BFADDE0AD2B1E1D10 /* Alamofire-prefix.pch */, + E949E5FAFED6D1CEB3FE99EABFDD821F /* Alamofire-umbrella.h */, + 7612D5B114271B1DA2A6684D42466E0E /* Info.plist */, + ); + name = "Support Files"; + path = "../Target Support Files/Alamofire"; + sourceTree = ""; + }; + 6DDBB88BF7BCB97D75B4DECE96B6552D /* Support Files */ = { + isa = PBXGroup; + children = ( + 981AADAB498959EE24EEA2174A6B76CE /* Info.plist */, + 852CFF98838A9114714AE2A0FFF79326 /* Nimble.modulemap */, + A63C40834852E0A17E69166FAC320570 /* Nimble.xcconfig */, + 35FEFFE81F749A3E4CB385C880B7BCD1 /* Nimble-dummy.m */, + A31A3C5759DD5D6B6E40993423C24B9F /* Nimble-prefix.pch */, + B169EB60F7FD48C11D3AB64B0F370D05 /* Nimble-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/Nimble"; + sourceTree = ""; + }; 75BADEDB5FE956D27182473A1A05132C /* Pods-Astro */ = { isa = PBXGroup; children = ( @@ -902,69 +1040,6 @@ path = "Target Support Files/Pods-Astro"; sourceTree = ""; }; - 7A612BB7D2167E755F0F6802D5B0935A /* Nocilla */ = { - isa = PBXGroup; - children = ( - 071801FD957F89FDFD4A42FA1CE52621 /* ASIHTTPRequestStub.h */, - 12C64E971D6125A9DD3C66125BC78175 /* ASIHTTPRequestStub.m */, - A49E53C084F80BE60CCD84F9475612BF /* LSASIHTTPRequestAdapter.h */, - 489CA6D4A92715860DCDDFDB61B71884 /* LSASIHTTPRequestAdapter.m */, - FED3C10BB4D401609B8331544CF4494B /* LSASIHTTPRequestHook.h */, - 13982F321AEFE4FC8A435F23B9E0B951 /* LSASIHTTPRequestHook.m */, - 5F16FD68893A2ED451E86E1599F8FC16 /* LSDataMatcher.h */, - 6B9BB65FFA5699B6F2A3494430B04909 /* LSDataMatcher.m */, - 1053740C7A0A2C8875D945447E55AF4E /* LSHTTPBody.h */, - D39098627F8A63B173221DD4453E1816 /* LSHTTPClientHook.h */, - DB998CB4C2F2B143F59EEE0FE9D1274D /* LSHTTPClientHook.m */, - B175E85AD5037C0096B0195D51B93034 /* LSHTTPRequest.h */, - 73C18D240C638526F78D36934DAA00DC /* LSHTTPRequestDiff.h */, - 7D6F8C4B96CC18FA8D2EB43CFD0EF551 /* LSHTTPRequestDiff.m */, - 75B4742BC7EE5F35B53FF4C55C5E6B64 /* LSHTTPRequestDSLRepresentation.h */, - F2EED208FA3C8DC3E0FF81F145DF3C84 /* LSHTTPRequestDSLRepresentation.m */, - 34E7DEA475E58F139AD7A9775C450E8F /* LSHTTPResponse.h */, - 06DA7638B59C97A622CF8EC4E26CBF68 /* LSHTTPStubURLProtocol.h */, - 7E54E0A32D638DABAAE1938E085649F5 /* LSHTTPStubURLProtocol.m */, - 82B9AF145DEC704D066D60237E7CBDBB /* LSMatcheable.h */, - B4AF807EB366D473D7D2C7B4CAED09FC /* LSMatcher.h */, - 5D1F363DAC6ADA834FD28B2BA055E4F7 /* LSMatcher.m */, - 59A8DB2950CDF625EDB83CE63F46A6F6 /* LSNocilla.h */, - 5022140F377B8260DCB428BF0F20E52C /* LSNocilla.m */, - 5990DDE7DB7FAD5BF27CAC2D99935E28 /* LSNSURLHook.h */, - 6F781DA3105FD0D4D698C91B2303DE66 /* LSNSURLHook.m */, - D7E2DFFAF9C53B8870CECB5F7F64089D /* LSNSURLSessionHook.h */, - BC2FBAEA7B0E5E601D62EF9567B9A1D3 /* LSNSURLSessionHook.m */, - 94914DECE29A7AF99992E91B0D97AA9B /* LSRegexMatcher.h */, - 546BBA0E106E3A9EF12D5EE0C95B0462 /* LSRegexMatcher.m */, - F1A19438A8C71AB3785FC2728ACF7D35 /* LSStringMatcher.h */, - F63BB0F4518DCE933B9046B940D5A9B1 /* LSStringMatcher.m */, - 3CE296A8C853B548D6A84BD8B5CFB0E8 /* LSStubRequest.h */, - EC68F3FFC9D47A8F658D2289435BE266 /* LSStubRequest.m */, - D599F054E4FE2159DEF282CBE0E31DFA /* LSStubRequestDSL.h */, - 5005FBED4883E5ECB521DFF686AF8E4E /* LSStubRequestDSL.m */, - 9108B9F77C510C7B00290542C62100BA /* LSStubResponse.h */, - 419B8EC230B0AF8A2877C52EDD18C518 /* LSStubResponse.m */, - 77F6A5367DD6585F38FE4EAE6E016F14 /* LSStubResponseDSL.h */, - 6ABDA7E71C2F0EA181105310A6FC9F60 /* LSStubResponseDSL.m */, - CDF5736D9D7A92F8E27A62AEF194A5D3 /* Nocilla.h */, - 04ABE7FAC5DD55B63509FCD2B4FC184E /* NSData+Matcheable.h */, - 1BFE4E270087F7D5D4D3C85F001C5D61 /* NSData+Matcheable.m */, - 612F5B7DAD9D03A91ED5FC2A20417E03 /* NSData+Nocilla.h */, - 26497E5736035420A6E2C4002BFCA9B2 /* NSData+Nocilla.m */, - 9DF421BBCDC5566E84F21FCB2FD3C914 /* NSRegularExpression+Matcheable.h */, - 9BD5AAB63C0A5D8E5DC6EE658F519C3E /* NSRegularExpression+Matcheable.m */, - E64F5CCF316D56E2C07425CC0D9DCB90 /* NSString+Matcheable.h */, - EEF30250E18C7F3BC7A5DC0599B4CC6B /* NSString+Matcheable.m */, - D057E3DA74D706A5230C38A2A8DA23BA /* NSString+Nocilla.h */, - 7DA8F5655DFE6949CA30A88FD740A18B /* NSString+Nocilla.m */, - 2E5570E2270E74080439F093AE77AF01 /* NSURLRequest+DSL.h */, - BA6AF301972A52D836E479EF9F1FF7C6 /* NSURLRequest+DSL.m */, - A7976230AA3F6FF83457AAFFCC39F987 /* NSURLRequest+LSHTTPRequest.h */, - 12ADD80150F556C531DE5DA952B00FCF /* NSURLRequest+LSHTTPRequest.m */, - C982565C6EEE667BD898FF47527D5978 /* Support Files */, - ); - path = Nocilla; - sourceTree = ""; - }; 7ACA5C36D4C114F9D9BDE8A0220636D6 /* Products */ = { isa = PBXGroup; children = ( @@ -987,24 +1062,73 @@ 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, CA5C3BEA446A9E8B0831F4A0D9FD9AFD /* Development Pods */, 106194991891EBCB4DDC3E7B69FE5D75 /* Frameworks */, - 1ABE14C1EB7548408290F060B1FD6F68 /* Pods */, + 3E8E62510B0A1F03F360EE3F45F37F5A /* Pods */, 7ACA5C36D4C114F9D9BDE8A0220636D6 /* Products */, 1C28C13A1BB5272BFE90AFD378132CDE /* Targets Support Files */, ); sourceTree = ""; }; - 822070FF93E8BE3A972672E64B3BC794 /* Support Files */ = { + 8C01658DB077D597E6247CC9DE0C8FA9 /* Nocilla */ = { isa = PBXGroup; children = ( - 25FBBE12B9698BE57E33603547EB37BC /* Freddy.modulemap */, - E5C600D0851A3EFA2A461D6559885924 /* Freddy.xcconfig */, - BFC88CB4D2A5E653FE76097D9DCAEA4B /* Freddy-dummy.m */, - 48B28117F0E4929218975EBCD7755CD8 /* Freddy-prefix.pch */, - AD2511DF7B5065EB4197A4B475803F14 /* Freddy-umbrella.h */, - 6998EC154F33D892A19AA8FD5E914E03 /* Info.plist */, + 9C172C4ABEF73E6346779462EF99A24E /* ASIHTTPRequestStub.h */, + FB36CE291992844FE7A45419C0548A38 /* ASIHTTPRequestStub.m */, + 298DABB9BB2FB2DA441B86731F89F528 /* LSASIHTTPRequestAdapter.h */, + 28E7D50C8D217D7E3F2764432E597CF4 /* LSASIHTTPRequestAdapter.m */, + 5905376E12FC20FEFB3E8B533527973E /* LSASIHTTPRequestHook.h */, + FC4ED934BA3A8419AC4EF8C3C1E71579 /* LSASIHTTPRequestHook.m */, + 43E4D1066EB44FB7BBE0C05352348E7F /* LSDataMatcher.h */, + CC067C5632AC878871B27F417FA420DA /* LSDataMatcher.m */, + E2416C6003EDE2F2F23F9A0A29A2C9C7 /* LSHTTPBody.h */, + 705F1B1A29FAA942A65434FB4815A36D /* LSHTTPClientHook.h */, + E272E2EF71853703F3CDA826A479D7D4 /* LSHTTPClientHook.m */, + B7A458E7FC5F0B82EF38CFE791D5F7B5 /* LSHTTPRequest.h */, + F35887722351255C405176EC37414175 /* LSHTTPRequestDiff.h */, + 0D732738D87FBCCD8CAD7BDE2BC93D3C /* LSHTTPRequestDiff.m */, + 7BFAAD6E4119D80CD951A46889C39FF3 /* LSHTTPRequestDSLRepresentation.h */, + 5796F3D38D4CC0C747870F1199E04C95 /* LSHTTPRequestDSLRepresentation.m */, + E01777C7EE471B814CD8F813DBBF0851 /* LSHTTPResponse.h */, + 7840488B0C9AC5B861B63FCAB5403828 /* LSHTTPStubURLProtocol.h */, + 775A5957C73D966C589B5CF833ED9265 /* LSHTTPStubURLProtocol.m */, + 80CAF65F2FB9DC5364085BDF485A7B2E /* LSMatcheable.h */, + 27B6F67D82FFE2DE96C1CB9AD45113B2 /* LSMatcher.h */, + 2ADACDEBD467D10513EA63E6102B2F22 /* LSMatcher.m */, + 0DC9E56A8D14C7D63CD12CA5A1D410A5 /* LSNocilla.h */, + 1C073BEEC136249637E22B7C6F9413C4 /* LSNocilla.m */, + 6D101D9221BD3C7FD10D7FC56D4D0259 /* LSNSURLHook.h */, + 844AA432B11A38D608D923A582868EAC /* LSNSURLHook.m */, + CB7F6F3D25B1B9326B861E03928584A0 /* LSNSURLSessionHook.h */, + 726AD99F23F018BA941D0453A5334B41 /* LSNSURLSessionHook.m */, + 8478128CE80F1923F00F7ABB963445E3 /* LSRegexMatcher.h */, + B9EBBC3BFE00D8E205D6DCCC86AC5CEC /* LSRegexMatcher.m */, + 935805BA03F9777174A970A23B24FC18 /* LSStringMatcher.h */, + 4D3CCB37118665EF74FAD3EFBF9A833B /* LSStringMatcher.m */, + 8EDF311A32112DD839DBA94581ADB793 /* LSStubRequest.h */, + BA36334FABC47EC9CC006D2F1E155290 /* LSStubRequest.m */, + 99BDD588C72B35D7B24CAEC29C01E27B /* LSStubRequestDSL.h */, + D8F2A7570F3CB4CE926D551CF3787E17 /* LSStubRequestDSL.m */, + 091BC8190E80590146A6EFB11A4B99F9 /* LSStubResponse.h */, + D0A6D3A428910ACA352AD000575EDC3B /* LSStubResponse.m */, + 22E228A44F7AEFB0BDEFF1D782F9A348 /* LSStubResponseDSL.h */, + 9A8D751B7AB839DBD8B329F322ACE480 /* LSStubResponseDSL.m */, + 4F253C050EA740DAB7F27AEC93703F14 /* Nocilla.h */, + 96F9B4222FCE15BC3CCD555BF892815B /* NSData+Matcheable.h */, + 12E640D001A21CA43DE97111B2D12B9C /* NSData+Matcheable.m */, + CDC96004790B5821E65D3741680B3705 /* NSData+Nocilla.h */, + FC9D596C715B462C4CC0DDEDD2CEAFE7 /* NSData+Nocilla.m */, + FBDECF0A766E709C9FB6C2DC404AA7B8 /* NSRegularExpression+Matcheable.h */, + B94F3CBB538ACF449363BC620B9D1CF2 /* NSRegularExpression+Matcheable.m */, + D199A3E8156AE7903C0E27E83A5E4E29 /* NSString+Matcheable.h */, + EF183B545724D34251F28485042C0290 /* NSString+Matcheable.m */, + DD0599BF41155E9A21C6829AADA12EEB /* NSString+Nocilla.h */, + 8C2313AA64F552CF741242BF1E85CBD0 /* NSString+Nocilla.m */, + 434DF22B7BBC30B5E3870DEA54191263 /* NSURLRequest+DSL.h */, + 8185CCDB3E4BA12414F4A69C31333C1C /* NSURLRequest+DSL.m */, + 4A32029E1D904B5B2A1DE1652D056556 /* NSURLRequest+LSHTTPRequest.h */, + 9168F05B875F16FB7DF6C42AF6C11A11 /* NSURLRequest+LSHTTPRequest.m */, + AADFEEC48A1BEF84F6F0FDE3389E5398 /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/Freddy"; + path = Nocilla; sourceTree = ""; }; 90A500996396D7E31F4E8EA49E545E3F /* iOS */ = { @@ -1026,78 +1150,54 @@ name = UI; sourceTree = ""; }; - ABDB93E990A91610CA6DCC71E723D7F4 /* Support Files */ = { + AADFEEC48A1BEF84F6F0FDE3389E5398 /* Support Files */ = { isa = PBXGroup; children = ( - C653AAEBCA9E9BA0A57EB9B1CCCE3BAC /* Info.plist */, - B0AD6D8DFD5E95FE41BC3449E756D606 /* Quick.modulemap */, - 54509D781D6C2DA65347973554D03C73 /* Quick.xcconfig */, - 2767B46482B0569CB7A3D8A5171E1481 /* Quick-dummy.m */, - 2FCAC907B638BCDE89FBC4E26D1542AF /* Quick-prefix.pch */, - 4BF2D557873185C73BE025D1BBE21A10 /* Quick-umbrella.h */, + 966E7F24628278B30C3E20F7A62009EE /* Info.plist */, + 3E47B4F75D7BC6FDC4F63AF9BBE63A47 /* Nocilla.modulemap */, + E750B2DF819850FEBEBB5DD0D67C80AC /* Nocilla.xcconfig */, + FA98DAF2AF9128FF34FDC07E582BD369 /* Nocilla-dummy.m */, + E100A8FFB7414CC7EB52FAD79C733349 /* Nocilla-prefix.pch */, + E69B476F4410F0F29153127554FEB86D /* Nocilla-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/Quick"; + path = "../Target Support Files/Nocilla"; sourceTree = ""; }; - B170A0E5D81E80C6E35BEBE82480E604 /* Quick */ = { + C2EF919F5CF86D0C80CF46E9DA798C51 /* Support Files */ = { isa = PBXGroup; children = ( - B789B85D4CF17532F49A10E9C5F8D9EC /* Callsite.swift */, - C1D362BF523A9A5F5597677017D9479B /* Closures.swift */, - 23AFD3DA2A1EE218A39A93ACE7800FEA /* Configuration.swift */, - EFDC167F51D907DA3C0BB648440C27F7 /* DSL.swift */, - 8BEAFEE666D85EA288AF1A32B5F69FAF /* ErrorUtility.swift */, - 3AA005D7A247CDFA9BFAE4F33F1950A4 /* Example.swift */, - 21295EB820534EBAAEB5834DBCE02CC8 /* ExampleGroup.swift */, - 305F507D0BC868E0EFA0E492C50BB344 /* ExampleHooks.swift */, - 377FF62898B9F233DAEAC2A03F7ED71F /* ExampleMetadata.swift */, - 03C4A91411BA8D06FCB83DB7EB88B2D9 /* Filter.swift */, - 054E3AE9685647513F4760BCC648C0FA /* HooksPhase.swift */, - 1D6F35F873EE68AC1B849C53C8377143 /* NSBundle+CurrentTestBundle.swift */, - BA18B1B763EDA6EBEFF2B9002A0B4538 /* NSString+QCKSelectorName.h */, - 78E2E262C85B2AF1456483A15F4328E4 /* NSString+QCKSelectorName.m */, - B1E3F6C9016D030279790B508587F4F5 /* QCKDSL.h */, - D5663CF2A9C80609B52068DAB5F86C8E /* QCKDSL.m */, - 7D2A40F21DB871AF2ED94C5485E0AE82 /* Quick.h */, - E67AD8E1BA3D5AE433588B5D864123CA /* QuickConfiguration.h */, - 0C12E2AC29BB461B5CA36A55A98309C9 /* QuickConfiguration.m */, - F313245E710FF08DD42E94F62560C21A /* QuickSelectedTestSuiteBuilder.swift */, - DA2117C0F3C548AD5CC636A142BE9CD6 /* QuickSpec.h */, - 0173D589AE58B242AF1C54C7B7C4A174 /* QuickSpec.m */, - C003AAA0D11CDA242DD3A3C5AEA13800 /* QuickTestSuite.swift */, - EC674E21556741A41DAFF6F06A257444 /* String+FileName.swift */, - F2B3E7999D62C38A0ADE7FC63494B885 /* SuiteHooks.swift */, - 550E4A859435509BAB6638D3E05ED846 /* World.h */, - 15AB7D4A43EBBAA638AF047CF1486BC7 /* World.swift */, - 9012B52BD1D693879482A5B36C189E9A /* World+DSL.h */, - 2A355A0E9474F123020DFB6D08415B7E /* World+DSL.swift */, - 5FD76D017AEEF056A8FC7A05D8562C2D /* XCTestSuite+QuickTestSuiteBuilder.m */, - ABDB93E990A91610CA6DCC71E723D7F4 /* Support Files */, + 4DA62206B560BB04331EC74341C0AB5E /* Info.plist */, + F10D944251761992660168C862F51494 /* SwiftTask.modulemap */, + BD7E3F82A2C60BEF0EF0D7C0AE8D0679 /* SwiftTask.xcconfig */, + AA03013C5E3F1A694BE38DD7C0747083 /* SwiftTask-dummy.m */, + 28620A4EE8E9AD7EB25010E54FBE0C88 /* SwiftTask-prefix.pch */, + 1072D15ED5ADB6DC83CCB4B1AD251A7A /* SwiftTask-umbrella.h */, ); - path = Quick; + name = "Support Files"; + path = "../Target Support Files/SwiftTask"; sourceTree = ""; }; - C982565C6EEE667BD898FF47527D5978 /* Support Files */ = { + CA5C3BEA446A9E8B0831F4A0D9FD9AFD /* Development Pods */ = { isa = PBXGroup; children = ( - 5354576D7F0C0BE772A0B0DB707D9FD9 /* Info.plist */, - 9EA1CA9ABF02F7181B62A14C63C5E3E6 /* Nocilla.modulemap */, - 8FFD28BC7177BDC4BB2FC768DF2682AF /* Nocilla.xcconfig */, - F2A3A410983B0ACAC5571383B99CAB2D /* Nocilla-dummy.m */, - EE7F05482CE22FA4A2F9709C72C29F2F /* Nocilla-prefix.pch */, - 8E32FEBF48A8DF57EF672939A794ED19 /* Nocilla-umbrella.h */, + 349551D5BC8FCB15D04980F64473FF69 /* Astro */, ); - name = "Support Files"; - path = "../Target Support Files/Nocilla"; + name = "Development Pods"; sourceTree = ""; }; - CA5C3BEA446A9E8B0831F4A0D9FD9AFD /* Development Pods */ = { + CFF7981B98BD03A5C5948D76269225D5 /* Support Files */ = { isa = PBXGroup; children = ( - 349551D5BC8FCB15D04980F64473FF69 /* Astro */, + 1E3C0D761EAB5DED3CDEEF399643814B /* Info.plist */, + 71EB097E97F320C0A5540DC3EE56F8A7 /* Quick.modulemap */, + FF8FE74C450E10853DF2A94F517E686B /* Quick.xcconfig */, + 79D0014189CEC8B9AE487CDBA2E11C08 /* Quick-dummy.m */, + 1CD9E02F196DDDDD91C9DB3A95391F7B /* Quick-prefix.pch */, + DD69344463C6D11B4E7516C0AFFF745E /* Quick-umbrella.h */, ); - name = "Development Pods"; + name = "Support Files"; + path = "../Target Support Files/Quick"; sourceTree = ""; }; D46E4AFF431FFB20F25599757DF958EF /* Networking */ = { @@ -1111,31 +1211,6 @@ path = Networking; sourceTree = ""; }; - D867CD60D15C30C7027114087265AB6C /* Alamofire */ = { - isa = PBXGroup; - children = ( - F6190D3DCC555A20AEBF4FE28A41C942 /* AFError.swift */, - 5E5DE73C1E1F70D7DECB931C65A67679 /* Alamofire.swift */, - 5A83BCB83F2572A3251B13551F69A138 /* DispatchQueue+Alamofire.swift */, - 9A84B567667740EA1C67D0C60C243975 /* MultipartFormData.swift */, - 475A05A4D234AEB496174CD3ECE69914 /* NetworkReachabilityManager.swift */, - 24AB3FEDC733FF0C724BA4579F65C1CB /* Notifications.swift */, - 6DF25ABEEAE287B7BAF35696B5ABBB4F /* ParameterEncoding.swift */, - 4A481A909D77FF7E93DD19C841760A26 /* Request.swift */, - ADED1DCB14A4876F2717EF125915C71C /* Response.swift */, - D478996036C1B8667C7EC683C038F598 /* ResponseSerialization.swift */, - 16A97930F8C7CD98BB75727908A6CEEF /* Result.swift */, - 51D68EE622CCBC2517A7E3842815620D /* ServerTrustPolicy.swift */, - 1AB54E1DE71B88A7C5744C4262CC89A2 /* SessionDelegate.swift */, - 846E1484C4DB60242A6128EEC54F4CB4 /* SessionManager.swift */, - 8605659EDD36D55482C9DB2EBE1A8A33 /* TaskDelegate.swift */, - 512114DC23E7E8EE7A0AF19D564A8039 /* Timeline.swift */, - CA13E6763DFBF5B5D1943920BE89D610 /* Validation.swift */, - E863F1947DA290DF0E5B4C74C2B42F52 /* Support Files */, - ); - path = Alamofire; - sourceTree = ""; - }; DD6A520257E2DA1470283635103EB06B /* Support Files */ = { isa = PBXGroup; children = ( @@ -1173,20 +1248,6 @@ path = UI; sourceTree = ""; }; - E863F1947DA290DF0E5B4C74C2B42F52 /* Support Files */ = { - isa = PBXGroup; - children = ( - 2B5702560A020F3507BFBC62776005EF /* Alamofire.modulemap */, - D29BCABEA6BBEBF1CFD4012121C0264B /* Alamofire.xcconfig */, - 6FA8866188D58E727285A4F69385A638 /* Alamofire-dummy.m */, - E542258439D60CFDE6C1F7CBFB9C9D53 /* Alamofire-prefix.pch */, - 99B26536B75CF50E75382CF77F5F68B4 /* Alamofire-umbrella.h */, - C37E4B7AD3DFF48E94B070DA3034FAF5 /* Info.plist */, - ); - name = "Support Files"; - path = "../Target Support Files/Alamofire"; - sourceTree = ""; - }; ED92AA562443AF46AF8D8BE3AC4C085B /* Astro */ = { isa = PBXGroup; children = ( @@ -1203,20 +1264,6 @@ path = Astro; sourceTree = ""; }; - F36D0E4A5697BD7D226DFD4E17F24975 /* Support Files */ = { - isa = PBXGroup; - children = ( - CE8D6AF0AB4648D7505A7E1708DC6955 /* Info.plist */, - 0772C22DA40FABA4BC0475C3951BEB90 /* Nimble.modulemap */, - 018233AF6177486FA08EDB6B819B8852 /* Nimble.xcconfig */, - 52371319E2C73E2815BF88ED9A42E25F /* Nimble-dummy.m */, - 53DE0423F71B8E3831A57365BC6019A1 /* Nimble-prefix.pch */, - 8499C88CD54A0B131F08D126D46C7B9E /* Nimble-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Nimble"; - sourceTree = ""; - }; F3C19A259960EAF1D1A32522546E3D1F /* Utils */ = { isa = PBXGroup; children = ( @@ -1225,20 +1272,6 @@ name = Utils; sourceTree = ""; }; - F7B02BA557E8C32528CFDA17640BE675 /* Support Files */ = { - isa = PBXGroup; - children = ( - 7ECC0F2DB79B949AC2A58D6E532E6EEA /* Info.plist */, - 7D8AEAB1212407552DD77D55687CC654 /* SwiftTask.modulemap */, - E3C934F55950F055755F2FB5E331DA9B /* SwiftTask.xcconfig */, - 29DB305A733900DA8BE91E99DA1F6678 /* SwiftTask-dummy.m */, - 300B0279FE72478F7D093954D773B4DC /* SwiftTask-prefix.pch */, - 90458BEF3622BBC8AA13B41F18337D64 /* SwiftTask-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/SwiftTask"; - sourceTree = ""; - }; FD982DE5B6D1298260BEAE29CC0FCD2A /* Pods-AstroTests */ = { isa = PBXGroup; children = ( @@ -1324,32 +1357,35 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 691441A55E14AD6507F3F1AA48B90FB3 /* Headers */ = { + 648F1DF8706A2112A3E88719AC07A6B9 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - F860A14430F1CACDA8DD8D930D9D31C8 /* Pods-AstroTests-umbrella.h in Headers */, + CAB36E2E9ADBC842C1FC0235195764FD /* CurrentTestCaseTracker.h in Headers */, + 89AD78E4074EB23249969F39D82E8C28 /* CwlCatchBadInstruction.h in Headers */, + 0CFF6C6170F28B6C7E7EC9125AA4505A /* CwlCatchException.h in Headers */, + 24B2AFC31898725750519372CFB2350A /* DSL.h in Headers */, + 80EB3F3AD608D1B132A3EA4B3E28CAB1 /* mach_excServer.h in Headers */, + 9ABB68606EE3A3BC42DF42A46BC8CEBC /* Nimble-umbrella.h in Headers */, + F3199E5D140F672B588EC44DE319EDA3 /* Nimble.h in Headers */, + D5E0BE17FA1603C8607E85110ED3FC2C /* NMBExceptionCapture.h in Headers */, + E4F4F88CF0EA6E1FE71AFC5F827CE94D /* NMBStringify.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 9AACBB273ECD8316A57EEEE5E10835F6 /* Headers */ = { + 691441A55E14AD6507F3F1AA48B90FB3 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - E8DC5C8D0C37517C1E9309C63EFED4D0 /* Astro-umbrella.h in Headers */, + F860A14430F1CACDA8DD8D930D9D31C8 /* Pods-AstroTests-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - C9CAD1C0891D5863FF8627A68CC68ECA /* Headers */ = { + 9AACBB273ECD8316A57EEEE5E10835F6 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 866830C585216CA87A15D078A28C410A /* CurrentTestCaseTracker.h in Headers */, - EB9C4D2E388805F9157AA356D4A857D5 /* DSL.h in Headers */, - B47F2B1F7F5FEC4CE62F09832392E842 /* Nimble-umbrella.h in Headers */, - A1F69DD3961B60955EFD28E2BDF446E8 /* Nimble.h in Headers */, - 192C4EF47D90895E51E5597323364A3C /* NMBExceptionCapture.h in Headers */, - 0A9A1B8CB1963791ADDF67361E687CAA /* NMBStringify.h in Headers */, + E8DC5C8D0C37517C1E9309C63EFED4D0 /* Astro-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1365,14 +1401,14 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 63F83D6FFDA4A20864206D5CA7507315 /* NSString+QCKSelectorName.h in Headers */, - 037277A5335F4706D656E27E5DD15D11 /* QCKDSL.h in Headers */, + 9BAE4301475AA7A9B99292815CC0FF9A /* NSString+QCKSelectorName.h in Headers */, + 6735BCF216A4D6B335F84162272697D8 /* QCKDSL.h in Headers */, FB7D8621EE4D6676288245B294022C47 /* Quick-umbrella.h in Headers */, - 270FEEBAE0671C72A82B3CEE2F771E0B /* Quick.h in Headers */, - 073CCD3D1AE9A6857F9DC0CFAA511F6A /* QuickConfiguration.h in Headers */, - A47EF77A104A17550B47ECB220523317 /* QuickSpec.h in Headers */, - 5FD768C424450A19511BA433803546B7 /* World+DSL.h in Headers */, - 8335A65095F73165ACB070AA3BE0973D /* World.h in Headers */, + 23E21A2171D7E7FCA86815403EB7FBB4 /* Quick.h in Headers */, + B12603C6B3285F1836F3DEE349EC980B /* QuickConfiguration.h in Headers */, + F94967BD547D665FE10682D8CCCFF912 /* QuickSpec.h in Headers */, + 496E8B1CE48B7D5600206CBE612A0753 /* World+DSL.h in Headers */, + 56F7DD49AA4DFB9478DCA32886828B21 /* World.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1396,38 +1432,38 @@ productReference = BA3DC2ADF554F5AA1C3D8026782FCDD6 /* Nocilla.framework */; productType = "com.apple.product-type.framework"; }; - 40FF1C77152F384080A1A02E90A36DA9 /* Nimble */ = { + 658D059017BAD944D0775434631CF091 /* SwiftTask */ = { isa = PBXNativeTarget; - buildConfigurationList = A4964CB88DC1058EA701972205BBB4A0 /* Build configuration list for PBXNativeTarget "Nimble" */; + buildConfigurationList = E9ABD119A88865462F5930D19C7E8060 /* Build configuration list for PBXNativeTarget "SwiftTask" */; buildPhases = ( - 66CF5A604524D5A73EFB0DA2B361FDC8 /* Sources */, - 050B68EC615B591FDA5D0B855E697228 /* Frameworks */, - C9CAD1C0891D5863FF8627A68CC68ECA /* Headers */, + 6C54D4D5FEF567D7B3243E82651E143A /* Sources */, + 61A037DF53AF51363F4ADBA22308FEA1 /* Frameworks */, + 5DBD83AB4C800929D842C40CBDDA78BD /* Headers */, ); buildRules = ( ); dependencies = ( ); - name = Nimble; - productName = Nimble; - productReference = FCE3C6A2429004B3D14090204CC6CC53 /* Nimble.framework */; + name = SwiftTask; + productName = SwiftTask; + productReference = C4A303959AA23940B44A630C103DD53B /* SwiftTask.framework */; productType = "com.apple.product-type.framework"; }; - 658D059017BAD944D0775434631CF091 /* SwiftTask */ = { + 72E30CEFE495DD0EB9CFB72FCF80894C /* Nimble */ = { isa = PBXNativeTarget; - buildConfigurationList = E9ABD119A88865462F5930D19C7E8060 /* Build configuration list for PBXNativeTarget "SwiftTask" */; + buildConfigurationList = BDBD2BBEC8178F07B94D78F9E6991265 /* Build configuration list for PBXNativeTarget "Nimble" */; buildPhases = ( - 6C54D4D5FEF567D7B3243E82651E143A /* Sources */, - 61A037DF53AF51363F4ADBA22308FEA1 /* Frameworks */, - 5DBD83AB4C800929D842C40CBDDA78BD /* Headers */, + ED9F68BF109E5007EBB80B5DD2DD8A03 /* Sources */, + F8B360D4AAEBF44BCDC02A9A8054AC7B /* Frameworks */, + 648F1DF8706A2112A3E88719AC07A6B9 /* Headers */, ); buildRules = ( ); dependencies = ( ); - name = SwiftTask; - productName = SwiftTask; - productReference = C4A303959AA23940B44A630C103DD53B /* SwiftTask.framework */; + name = Nimble; + productName = Nimble; + productReference = FCE3C6A2429004B3D14090204CC6CC53 /* Nimble.framework */; productType = "com.apple.product-type.framework"; }; 79C040AFDDCE1BCBF6D8B5EB0B85887F /* Alamofire */ = { @@ -1570,7 +1606,7 @@ 79C040AFDDCE1BCBF6D8B5EB0B85887F /* Alamofire */, 91969E02CD48F26120134D15E489A85C /* Astro */, E693F703278AF18B59BC7B0FDF7B3650 /* Freddy */, - 40FF1C77152F384080A1A02E90A36DA9 /* Nimble */, + 72E30CEFE495DD0EB9CFB72FCF80894C /* Nimble */, 393E0E1A41299C44C63DBB766A243010 /* Nocilla */, ED668473F669DFBA756C8C69A8DA8ABA /* Pods-Astro */, CE56E0B4473A81AC796EE3538C555BB1 /* Pods-AstroTests */, @@ -1656,62 +1692,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 66CF5A604524D5A73EFB0DA2B361FDC8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DB2D57B1574B84BC7A733F47613080DC /* AdapterProtocols.swift in Sources */, - 30F0DD2AAF62C4A402C220E07E8C6C98 /* AllPass.swift in Sources */, - DC7E1C63312C0B4B7C76E6C9C4F1949C /* AssertionDispatcher.swift in Sources */, - 4846BC919D685D1A6927C22B319BF5BB /* AssertionRecorder.swift in Sources */, - 8AC936C1872CED091BEDD5BBB43FBE3E /* Async.swift in Sources */, - 59BF94BC2C9C7AEBF10547516224E504 /* AsyncMatcherWrapper.swift in Sources */, - 719B7010C936E7C78C61110452A3B33C /* BeAKindOf.swift in Sources */, - D0EEF6529F24EF7C1EABEF919A3B1D2F /* BeAnInstanceOf.swift in Sources */, - 161201824EE3922A10F509AB4F2DB523 /* BeCloseTo.swift in Sources */, - F76969F8B60A010FAA79D960E251F4EC /* BeEmpty.swift in Sources */, - 55E2DC8C6E93D6A0A34C31686200ADA5 /* BeginWith.swift in Sources */, - 9FC466460AAC0031C09C37F09A3DF032 /* BeGreaterThan.swift in Sources */, - A63164B84A22C7E0FDF3A30121CEE861 /* BeGreaterThanOrEqualTo.swift in Sources */, - A3ACA641503E24BD47E8AF10D4907A39 /* BeIdenticalTo.swift in Sources */, - B44CA6989B931C025C7BB2B9F5CEB4D6 /* BeLessThan.swift in Sources */, - 90D8EB6C28E1D64FE32D9A66EFFC23C5 /* BeLessThanOrEqual.swift in Sources */, - BE3B29F8DC00244F423717A62D73A7AC /* BeLogical.swift in Sources */, - 8BC79A9A7061C7E12A864E19C6928038 /* BeNil.swift in Sources */, - DB1E4BBCDC5993D6A360DF4CF5B59FE2 /* BeVoid.swift in Sources */, - 45099B79D9242078EB5C5BA7F6BAD209 /* Contain.swift in Sources */, - D7684539AFE9926F12A51A1DBBDEDAD8 /* DSL+Wait.swift in Sources */, - 7D635AC46655BFC2E195DF3B10284A36 /* DSL.m in Sources */, - 1D00380CB24FD873D03376CC6E9C55E1 /* DSL.swift in Sources */, - 4339A9964176E715E909554ED062D717 /* EndWith.swift in Sources */, - 74A3FAE2302123E379CA7F5EEB2AD19A /* Equal.swift in Sources */, - 9BFC09FB900963AF0813771CE5858CFB /* Errors.swift in Sources */, - AC7E5AC1841D836761B4154BE0B43D29 /* Expectation.swift in Sources */, - 6F22E6AD6E840224D60B79003945E74D /* Expression.swift in Sources */, - F682F23BCD82A89264547460CBA9F077 /* FailureMessage.swift in Sources */, - 8FDE9405A930F8277771A142D150C660 /* Functional.swift in Sources */, - FA1149FAC1E3BDDC971E04A052037DC0 /* HaveCount.swift in Sources */, - 0467369F19D8A99FD4F12FCA92C4D0D4 /* Match.swift in Sources */, - 8679D94B1C5A51B76CE4064A36FD2F07 /* MatcherFunc.swift in Sources */, - 898EA2E37F5E43EAAAF3CE85E3E58855 /* MatcherProtocols.swift in Sources */, - 9F37AC5BEC60E4932EDCC5DD0E05E33A /* MatchError.swift in Sources */, - 88A36E7B64F0A565C806F29E83FF0B4F /* Nimble-dummy.m in Sources */, - 192AA689FCF000B724E91DD2E0A5C801 /* NimbleEnvironment.swift in Sources */, - 7543CC2ADC0CD764A090380B14E8A1B4 /* NimbleXCTestHandler.swift in Sources */, - C908B67E55D22EF3E34AB19171FFC0A0 /* NMBExceptionCapture.m in Sources */, - EADDC14CBF173E01401098091976B5F9 /* NMBExpectation.swift in Sources */, - 89C4DF92D207FE3E5AA480B967699CBE /* NMBObjCMatcher.swift in Sources */, - 25364C0863486C882DDDBC76B42C4C3E /* NMBStringify.m in Sources */, - CB4924760FF11BC55A5545D970CD9233 /* PostNotification.swift in Sources */, - 369F9F7F2F3492C0A2083F156FB1E1D9 /* RaisesException.swift in Sources */, - 3B3B4E109B651C524ECF52AAF1888D93 /* SatisfyAnyOf.swift in Sources */, - 774564E76F45CEBD01B57E27B3336BFD /* SourceLocation.swift in Sources */, - E39FF06D1FA27A05A466E7F2BD57563A /* Stringers.swift in Sources */, - EE9BD67665F455A58EB00E695FD2BE3F /* ThrowError.swift in Sources */, - 179AC473A3676744F7C995FA8E680064 /* XCTestObservationCenter+Register.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 6C54D4D5FEF567D7B3243E82651E143A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1781,18 +1761,82 @@ AC3B78B98A81CCCA230DA7A0BC4F10B1 /* Filter.swift in Sources */, D7A646B09D05BD9423A1629EC6CC662B /* HooksPhase.swift in Sources */, 7BE489F32BE286EB24CA28BEE8FCA4FE /* NSBundle+CurrentTestBundle.swift in Sources */, - F65BC45BCF2155582AFE03DE625352A3 /* NSString+QCKSelectorName.m in Sources */, - 707C7BA834D3573C883AE24BEEC1BBC3 /* QCKDSL.m in Sources */, + A5B81BFE65BE23BC6DC8D52BF2CF752D /* NSString+QCKSelectorName.m in Sources */, + 924743723501046E72C2A51432208BDC /* QCKDSL.m in Sources */, DB294A14E23364B8B2B4E46FD8677FFB /* Quick-dummy.m in Sources */, - 68DEA79938C67989D4B1DAE9A477CC34 /* QuickConfiguration.m in Sources */, + 105C93C00BC8EC4B64164D455D7B7C28 /* QuickConfiguration.m in Sources */, B37592A64C36F09413FA486F83F789F0 /* QuickSelectedTestSuiteBuilder.swift in Sources */, - 963E33529852F9EFB574D6160CDDE7D6 /* QuickSpec.m in Sources */, + 7FD71384CF4A7526AC5049B5F3C6D84F /* QuickSpec.m in Sources */, 02411A2CA73A4024FDD335D6E08970AF /* QuickTestSuite.swift in Sources */, 3C0916C48CA10162D3762D798BC0B110 /* String+FileName.swift in Sources */, 81755C0A977CEA435BBCCD2C7E6DF8FE /* SuiteHooks.swift in Sources */, 6F0D2A0EB1839F6661685B993584676F /* World+DSL.swift in Sources */, 23F9469701D519F1496D3030618FD84B /* World.swift in Sources */, - 82122FF76AB199158E5EF889C4E0DC2A /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */, + 2B478E2DC2FF40768F6148A43C678C2F /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + ED9F68BF109E5007EBB80B5DD2DD8A03 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C07BD9323A29CD806C67902E526FE90E /* AdapterProtocols.swift in Sources */, + 5A36DA20C0A5E5C24E774C91151D7B4A /* AllPass.swift in Sources */, + 4ED4AAD00C029EC91DCDF87F21999BCA /* AssertionDispatcher.swift in Sources */, + 9240F19D758891B8DE78FFF411417854 /* AssertionRecorder.swift in Sources */, + FDE2F28602C071D8D549F37B7A86A339 /* Async.swift in Sources */, + 823913707A4CA8384A5AC01C741E5750 /* AsyncMatcherWrapper.swift in Sources */, + 698E9878CE282958D0376C869C410215 /* BeAKindOf.swift in Sources */, + 459308E67D997C1EC1520EF78156E5CA /* BeAnInstanceOf.swift in Sources */, + 33E5A021D1D2FC44E77FDF3747D1B45E /* BeCloseTo.swift in Sources */, + E5A9AF7EFA781F806C84AA56F8B79A5C /* BeEmpty.swift in Sources */, + BE0567510EAD2D0480CC65FD033F43B0 /* BeginWith.swift in Sources */, + B2439A2037E6D944D1217FF2C1A12B3C /* BeGreaterThan.swift in Sources */, + BB08049325259E02F3290F3D03845EF4 /* BeGreaterThanOrEqualTo.swift in Sources */, + 47FF3675B40FB878EEDDF260B563A917 /* BeIdenticalTo.swift in Sources */, + B339B5B84857480DF2F5A8C9D5A7B410 /* BeLessThan.swift in Sources */, + DBDBDB3890148EC75CA14100F9F40DB6 /* BeLessThanOrEqual.swift in Sources */, + 6A039692C114B65A2C720B45DCEA9CC3 /* BeLogical.swift in Sources */, + 672B368FFAEC560683DAE200D4403F6A /* BeNil.swift in Sources */, + E2FB580DEEC64761CFB3586EBC0A128C /* BeVoid.swift in Sources */, + 3606F73517A2B9A6576399EC135BC780 /* Contain.swift in Sources */, + AC4D459FD118FCA91F663E44A9190A0D /* CwlBadInstructionException.swift in Sources */, + 1204045A1E149162E67122B01E22C5B9 /* CwlCatchBadInstruction.m in Sources */, + 2A4BD9C9B0EC5057919893C37FA3A2E4 /* CwlCatchBadInstruction.swift in Sources */, + 6FC0B2AA820185C97CD0B5CFAA6BF839 /* CwlCatchException.m in Sources */, + B59A07EFC0D945B773AE51D42C68BD6E /* CwlCatchException.swift in Sources */, + 1997E66C5123E7585AA36A4EA3316C42 /* CwlDarwinDefinitions.swift in Sources */, + 7D608B1CFBCC2A5E0812EAAD4B307921 /* DSL+Wait.swift in Sources */, + 1C39F4BC3297E91BA401DFA50D28E64F /* DSL.m in Sources */, + 836D605A24E47908D3B42785036E4615 /* DSL.swift in Sources */, + 68AFFBAB1E604C6F3E73CD9A6F1E00AD /* EndWith.swift in Sources */, + 55A129D5A66A5622588694DA64560914 /* Equal.swift in Sources */, + 82E4932F032610E1D1D444C437E6CF5B /* Errors.swift in Sources */, + 789884544BCB14A5AE5BDDF060BF5A4D /* Expectation.swift in Sources */, + C54F106227C23A6344BB4B5F72071E68 /* Expression.swift in Sources */, + 32A15CB3A67F9D51D3908B632FDB993F /* FailureMessage.swift in Sources */, + 8C3B3F069A44B45658619C499E551214 /* Functional.swift in Sources */, + 95A8A7B8395A05E80009C910722872E2 /* HaveCount.swift in Sources */, + EAA6694D3070ED16224DF01435279BAC /* mach_excServer.c in Sources */, + 8053AC82A10A2BBFC110A74C0BD55CF6 /* Match.swift in Sources */, + AE50FD298CA1A9EDB17B82E997880C44 /* MatcherFunc.swift in Sources */, + 23C8DC5C171AAE9554AE980A620CC2DC /* MatcherProtocols.swift in Sources */, + 59C95DA75C1882A696E21A1835504425 /* MatchError.swift in Sources */, + 9E20125005339D1ADAC2362C7E5C4A2A /* Nimble-dummy.m in Sources */, + 41DABD9E1F8798C296F3A34472BAB79E /* NimbleEnvironment.swift in Sources */, + C7B4B368446BE295364BC8EFAF217263 /* NimbleXCTestHandler.swift in Sources */, + E7E4AEB8857587C426257582E6829D39 /* NMBExceptionCapture.m in Sources */, + 2903F9123978AA04E76F86F183FF99A0 /* NMBExpectation.swift in Sources */, + 425986BA8FA89A5F4844188220E86B94 /* NMBObjCMatcher.swift in Sources */, + 4FD7C35D72F219E04DF522D30813FCCA /* NMBStringify.m in Sources */, + 2F2BACDFAC03C2E7789C205EA7106BB1 /* PostNotification.swift in Sources */, + 62DEC5F0616CD40D23EDEAB17CF39423 /* RaisesException.swift in Sources */, + 7BA64FD52F88EB9BF55FCD294A9A29C3 /* SatisfyAnyOf.swift in Sources */, + 367D40230FBC81C9A1A0DA9D2AB20389 /* SourceLocation.swift in Sources */, + 517F93419A9ADECFE89F7E72A01AF61F /* Stringers.swift in Sources */, + AF7584BF6AAFB26AA1E7B93988786C14 /* ThrowAssertion.swift in Sources */, + A44194C2C4B01E71AA0B6D21FEFBE284 /* ThrowError.swift in Sources */, + F9E597EEF0E08D22D2C039A88D27C287 /* XCTestObservationCenter+Register.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1862,7 +1906,7 @@ DDA097EBB4CBA18A805F41AF62909DD9 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Nimble; - target = 40FF1C77152F384080A1A02E90A36DA9 /* Nimble */; + target = 72E30CEFE495DD0EB9CFB72FCF80894C /* Nimble */; targetProxy = D3D896A7145B7E3F31F40780A713EE4D /* PBXContainerItemProxy */; }; E951C5852BB777A049F2C12B8CA1CBEB /* PBXTargetDependency */ = { @@ -1967,7 +2011,7 @@ }; 6AF65E93BC3EE1B1F29F17EB8A26E3F5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 54509D781D6C2DA65347973554D03C73 /* Quick.xcconfig */; + baseConfigurationReference = FF8FE74C450E10853DF2A94F517E686B /* Quick.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2036,7 +2080,7 @@ }; 7F93EF234CD87F7448472375CC1EFA96 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D29BCABEA6BBEBF1CFD4012121C0264B /* Alamofire.xcconfig */; + baseConfigurationReference = C9DB44AFF48FB129824685D4784BD2DE /* Alamofire.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2069,7 +2113,7 @@ }; 8085E9DF9F97ED6DCA51FF788FACD219 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E3C934F55950F055755F2FB5E331DA9B /* SwiftTask.xcconfig */; + baseConfigurationReference = BD7E3F82A2C60BEF0EF0D7C0AE8D0679 /* SwiftTask.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2167,7 +2211,7 @@ }; 878E6A7A8AFC976C4CA0708416D59337 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8FFD28BC7177BDC4BB2FC768DF2682AF /* Nocilla.xcconfig */; + baseConfigurationReference = E750B2DF819850FEBEBB5DD0D67C80AC /* Nocilla.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2197,9 +2241,9 @@ }; name = Release; }; - A4430C9A172B825D8C3897B6DC93C8D4 /* Release */ = { + 9AC2329E6031F3278E6F25A167C19A3F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 018233AF6177486FA08EDB6B819B8852 /* Nimble.xcconfig */; + baseConfigurationReference = A63C40834852E0A17E69166FAC320570 /* Nimble.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2271,7 +2315,7 @@ }; C88DD470FF2F9AD3DBD5E137ED98B4FE /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8FFD28BC7177BDC4BB2FC768DF2682AF /* Nocilla.xcconfig */; + baseConfigurationReference = E750B2DF819850FEBEBB5DD0D67C80AC /* Nocilla.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2303,7 +2347,7 @@ }; CA8704554766DA411A89EC8663C68738 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 54509D781D6C2DA65347973554D03C73 /* Quick.xcconfig */; + baseConfigurationReference = FF8FE74C450E10853DF2A94F517E686B /* Quick.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2371,7 +2415,7 @@ }; D553F8F088806726C51F383152DC492A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E5C600D0851A3EFA2A461D6559885924 /* Freddy.xcconfig */; + baseConfigurationReference = EDDF3FCF975C596DBCF5B852F422CF3C /* Freddy.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2438,7 +2482,7 @@ }; DDA5A606A0B7062DEA5E47CD9FA65A3D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D29BCABEA6BBEBF1CFD4012121C0264B /* Alamofire.xcconfig */; + baseConfigurationReference = C9DB44AFF48FB129824685D4784BD2DE /* Alamofire.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2468,9 +2512,9 @@ }; name = Release; }; - E1D7FA5E8F224B121D0ECBD7ED084C38 /* Debug */ = { + E4F422669B61F3E892111A92D3B0ECFF /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 018233AF6177486FA08EDB6B819B8852 /* Nimble.xcconfig */; + baseConfigurationReference = A63C40834852E0A17E69166FAC320570 /* Nimble.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2503,7 +2547,7 @@ }; F5B7D171842D46482AD965979B7DBA86 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E5C600D0851A3EFA2A461D6559885924 /* Freddy.xcconfig */; + baseConfigurationReference = EDDF3FCF975C596DBCF5B852F422CF3C /* Freddy.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2536,7 +2580,7 @@ }; FB4380981681EFB3C784C8284CEF01AB /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E3C934F55950F055755F2FB5E331DA9B /* SwiftTask.xcconfig */; + baseConfigurationReference = BD7E3F82A2C60BEF0EF0D7C0AE8D0679 /* SwiftTask.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2614,11 +2658,11 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A4964CB88DC1058EA701972205BBB4A0 /* Build configuration list for PBXNativeTarget "Nimble" */ = { + BDBD2BBEC8178F07B94D78F9E6991265 /* Build configuration list for PBXNativeTarget "Nimble" */ = { isa = XCConfigurationList; buildConfigurations = ( - E1D7FA5E8F224B121D0ECBD7ED084C38 /* Debug */, - A4430C9A172B825D8C3897B6DC93C8D4 /* Release */, + E4F422669B61F3E892111A92D3B0ECFF /* Debug */, + 9AC2329E6031F3278E6F25A167C19A3F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Pods/Quick/README.md b/Pods/Quick/README.md index bced23c..5c94cef 100644 --- a/Pods/Quick/README.md +++ b/Pods/Quick/README.md @@ -1,5 +1,7 @@ ![](http://f.cl.ly/items/0r1E192C1R0b2g2Q3h2w/QuickLogo_Color.png) +[![Build Status](https://travis-ci.org/Quick/Quick.svg?branch=master)](https://travis-ci.org/Quick/Quick) + Quick is a behavior-driven development framework for Swift and Objective-C. Inspired by [RSpec](https://github.com/rspec/rspec), [Specta](https://github.com/specta/specta), and [Ginkgo](https://github.com/onsi/ginkgo). @@ -56,6 +58,12 @@ target 'MyUITests' do end ``` +## Projects using Quick + +Many apps use both Quick and Nimble however, as they are not included in the app binary, neither appear in “Top Used Libraries” blog posts. Therefore, it would be greatly appreciated to remind contributors that their efforts are valued by compiling a list of organizations and projects that use them. + +Does your organization or project use Quick and Nimble? If yes, [please add your project to the list](https://github.com/Quick/Quick/wiki/Projects-using-Quick). + ## License -Apache 2.0 license. See the `LICENSE` file for details. +Apache 2.0 license. See the [`LICENSE`](LICENSE) file for details. diff --git a/Pods/Quick/Sources/Quick/Configuration/Configuration.swift b/Pods/Quick/Sources/Quick/Configuration/Configuration.swift index 7b8c2db..9836fef 100644 --- a/Pods/Quick/Sources/Quick/Configuration/Configuration.swift +++ b/Pods/Quick/Sources/Quick/Configuration/Configuration.swift @@ -4,13 +4,13 @@ import Foundation A closure that temporarily exposes a Configuration object within the scope of the closure. */ -public typealias QuickConfigurer = (configuration: Configuration) -> () +public typealias QuickConfigurer = (_ configuration: Configuration) -> () /** A closure that, given metadata about an example, returns a boolean value indicating whether that example should be run. */ -public typealias ExampleFilter = (example: Example) -> Bool +public typealias ExampleFilter = (_ example: Example) -> Bool /** A configuration encapsulates various options you can use @@ -49,7 +49,7 @@ final public class Configuration: NSObject { whether that example should be included in the examples that are run. */ - public func include(filter: ExampleFilter) { + public func include(_ filter: @escaping ExampleFilter) { inclusionFilters.append(filter) } @@ -63,7 +63,7 @@ final public class Configuration: NSObject { whether that example should be excluded from the examples that are run. */ - public func exclude(filter: ExampleFilter) { + public func exclude(_ filter: @escaping ExampleFilter) { exclusionFilters.append(filter) } @@ -74,11 +74,11 @@ final public class Configuration: NSObject { */ #if _runtime(_ObjC) @objc(beforeEachWithMetadata:) - public func beforeEach(closure: BeforeExampleWithMetadataClosure) { + public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { exampleHooks.appendBefore(closure) } #else - public func beforeEach(closure: BeforeExampleWithMetadataClosure) { + public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { exampleHooks.appendBefore(closure) } #endif @@ -100,7 +100,7 @@ final public class Configuration: NSObject { - parameter closure: The closure to be executed before each example in the test suite. */ - public func beforeEach(closure: BeforeExampleClosure) { + public func beforeEach(_ closure: @escaping BeforeExampleClosure) { exampleHooks.appendBefore(closure) } @@ -111,11 +111,11 @@ final public class Configuration: NSObject { */ #if _runtime(_ObjC) @objc(afterEachWithMetadata:) - public func afterEach(closure: AfterExampleWithMetadataClosure) { + public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { exampleHooks.appendAfter(closure) } #else - public func afterEach(closure: AfterExampleWithMetadataClosure) { + public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { exampleHooks.appendAfter(closure) } #endif @@ -137,7 +137,7 @@ final public class Configuration: NSObject { - parameter closure: The closure to be executed before each example in the test suite. */ - public func afterEach(closure: AfterExampleClosure) { + public func afterEach(_ closure: @escaping AfterExampleClosure) { exampleHooks.appendAfter(closure) } @@ -146,7 +146,7 @@ final public class Configuration: NSObject { the given closure prior to any and all examples that are run. The two methods are functionally equivalent. */ - public func beforeSuite(closure: BeforeSuiteClosure) { + public func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { suiteHooks.appendBefore(closure) } @@ -155,7 +155,7 @@ final public class Configuration: NSObject { the given closure after all examples have been run. The two methods are functionally equivalent. */ - public func afterSuite(closure: AfterSuiteClosure) { + public func afterSuite(_ closure: @escaping AfterSuiteClosure) { suiteHooks.appendAfter(closure) } } diff --git a/Pods/Quick/Sources/Quick/DSL/DSL.swift b/Pods/Quick/Sources/Quick/DSL/DSL.swift index bc0e0b4..b514b82 100644 --- a/Pods/Quick/Sources/Quick/DSL/DSL.swift +++ b/Pods/Quick/Sources/Quick/DSL/DSL.swift @@ -8,7 +8,7 @@ - parameter closure: The closure to be run prior to any examples in the test suite. */ -public func beforeSuite(closure: BeforeSuiteClosure) { +public func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { World.sharedWorld.beforeSuite(closure) } @@ -22,7 +22,7 @@ public func beforeSuite(closure: BeforeSuiteClosure) { - parameter closure: The closure to be run after all of the examples in the test suite. */ -public func afterSuite(closure: AfterSuiteClosure) { +public func afterSuite(_ closure: @escaping AfterSuiteClosure) { World.sharedWorld.afterSuite(closure) } @@ -36,7 +36,7 @@ public func afterSuite(closure: AfterSuiteClosure) { using `describe` or `context`--the closure may contain any number of `beforeEach` and `afterEach` closures, as well as any number of examples (defined using `it`). */ -public func sharedExamples(name: String, closure: () -> ()) { +public func sharedExamples(_ name: String, closure: @escaping () -> ()) { World.sharedWorld.sharedExamples(name, closure: { (NSDictionary) in closure() }) } @@ -53,7 +53,7 @@ public func sharedExamples(name: String, closure: () -> ()) { The closure takes a SharedExampleContext as an argument. This context is a function that can be executed to retrieve parameters passed in via an `itBehavesLike` function. */ -public func sharedExamples(name: String, closure: SharedExampleClosure) { +public func sharedExamples(_ name: String, closure: @escaping SharedExampleClosure) { World.sharedWorld.sharedExamples(name, closure: closure) } @@ -65,14 +65,14 @@ public func sharedExamples(name: String, closure: SharedExampleClosure) { - parameter closure: A closure that can contain other examples. - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. */ -public func describe(description: String, flags: FilterFlags = [:], closure: () -> ()) { +public func describe(_ description: String, flags: FilterFlags = [:], closure: () -> ()) { World.sharedWorld.describe(description, flags: flags, closure: closure) } /** Defines an example group. Equivalent to `describe`. */ -public func context(description: String, flags: FilterFlags = [:], closure: () -> ()) { +public func context(_ description: String, flags: FilterFlags = [:], closure: () -> ()) { World.sharedWorld.context(description, flags: flags, closure: closure) } @@ -84,7 +84,7 @@ public func context(description: String, flags: FilterFlags = [:], closure: () - - parameter closure: The closure to be run prior to each example. */ -public func beforeEach(closure: BeforeExampleClosure) { +public func beforeEach(_ closure: @escaping BeforeExampleClosure) { World.sharedWorld.beforeEach(closure) } @@ -92,7 +92,7 @@ public func beforeEach(closure: BeforeExampleClosure) { Identical to Quick.DSL.beforeEach, except the closure is provided with metadata on the example that the closure is being run prior to. */ -public func beforeEach(closure: BeforeExampleWithMetadataClosure) { +public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { World.sharedWorld.beforeEach(closure: closure) } @@ -104,7 +104,7 @@ public func beforeEach(closure: BeforeExampleWithMetadataClosure) { - parameter closure: The closure to be run after each example. */ -public func afterEach(closure: AfterExampleClosure) { +public func afterEach(_ closure: @escaping AfterExampleClosure) { World.sharedWorld.afterEach(closure) } @@ -112,7 +112,7 @@ public func afterEach(closure: AfterExampleClosure) { Identical to Quick.DSL.afterEach, except the closure is provided with metadata on the example that the closure is being run after. */ -public func afterEach(closure: AfterExampleWithMetadataClosure) { +public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { World.sharedWorld.afterEach(closure: closure) } @@ -127,7 +127,7 @@ public func afterEach(closure: AfterExampleWithMetadataClosure) { - parameter file: The absolute path to the file containing the example. A sensible default is provided. - parameter line: The line containing the example. A sensible default is provided. */ -public func it(description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: () -> ()) { +public func it(_ description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: @escaping () -> ()) { World.sharedWorld.it(description, flags: flags, file: file, line: line, closure: closure) } @@ -143,7 +143,7 @@ public func it(description: String, flags: FilterFlags = [:], file: String = #fi - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. - parameter line: The line containing the current example group. A sensible default is provided. */ -public func itBehavesLike(name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line) { +public func itBehavesLike(_ name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line) { itBehavesLike(name, flags: flags, file: file, line: line, sharedExampleContext: { return [:] }) } @@ -163,7 +163,7 @@ public func itBehavesLike(name: String, flags: FilterFlags = [:], file: String = - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. - parameter line: The line containing the current example group. A sensible default is provided. */ -public func itBehavesLike(name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, sharedExampleContext: SharedExampleContext) { +public func itBehavesLike(_ name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) { World.sharedWorld.itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: flags, file: file, line: line) } @@ -174,7 +174,7 @@ public func itBehavesLike(name: String, flags: FilterFlags = [:], file: String = - parameter description: An arbitrary string describing the example or example group. - parameter closure: A closure that will not be evaluated. */ -public func pending(description: String, closure: () -> ()) { +public func pending(_ description: String, closure: () -> ()) { World.sharedWorld.pending(description, closure: closure) } @@ -182,7 +182,7 @@ public func pending(description: String, closure: () -> ()) { Use this to quickly mark a `describe` closure as pending. This disables all examples within the closure. */ -public func xdescribe(description: String, flags: FilterFlags, closure: () -> ()) { +public func xdescribe(_ description: String, flags: FilterFlags, closure: () -> ()) { World.sharedWorld.xdescribe(description, flags: flags, closure: closure) } @@ -190,7 +190,7 @@ public func xdescribe(description: String, flags: FilterFlags, closure: () -> () Use this to quickly mark a `context` closure as pending. This disables all examples within the closure. */ -public func xcontext(description: String, flags: FilterFlags, closure: () -> ()) { +public func xcontext(_ description: String, flags: FilterFlags, closure: () -> ()) { xdescribe(description, flags: flags, closure: closure) } @@ -198,7 +198,7 @@ public func xcontext(description: String, flags: FilterFlags, closure: () -> ()) Use this to quickly mark an `it` closure as pending. This disables the example and ensures the code within the closure is never run. */ -public func xit(description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: () -> ()) { +public func xit(_ description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: @escaping () -> ()) { World.sharedWorld.xit(description, flags: flags, file: file, line: line, closure: closure) } @@ -207,14 +207,14 @@ public func xit(description: String, flags: FilterFlags = [:], file: String = #f If any examples in the test suite are focused, only those examples are executed. This trumps any explicitly focused or unfocused examples within the closure--they are all treated as focused. */ -public func fdescribe(description: String, flags: FilterFlags = [:], closure: () -> ()) { +public func fdescribe(_ description: String, flags: FilterFlags = [:], closure: () -> ()) { World.sharedWorld.fdescribe(description, flags: flags, closure: closure) } /** Use this to quickly focus a `context` closure. Equivalent to `fdescribe`. */ -public func fcontext(description: String, flags: FilterFlags = [:], closure: () -> ()) { +public func fcontext(_ description: String, flags: FilterFlags = [:], closure: () -> ()) { fdescribe(description, flags: flags, closure: closure) } @@ -222,6 +222,6 @@ public func fcontext(description: String, flags: FilterFlags = [:], closure: () Use this to quickly focus an `it` closure, focusing the example. If any examples in the test suite are focused, only those examples are executed. */ -public func fit(description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: () -> ()) { +public func fit(_ description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: @escaping () -> ()) { World.sharedWorld.fit(description, flags: flags, file: file, line: line, closure: closure) } diff --git a/Pods/Quick/Sources/Quick/DSL/World+DSL.swift b/Pods/Quick/Sources/Quick/DSL/World+DSL.swift index 3b9a9be..ab35341 100644 --- a/Pods/Quick/Sources/Quick/DSL/World+DSL.swift +++ b/Pods/Quick/Sources/Quick/DSL/World+DSL.swift @@ -6,19 +6,19 @@ import Foundation writers use in their specs. */ extension World { - internal func beforeSuite(closure: BeforeSuiteClosure) { + internal func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { suiteHooks.appendBefore(closure) } - internal func afterSuite(closure: AfterSuiteClosure) { + internal func afterSuite(_ closure: @escaping AfterSuiteClosure) { suiteHooks.appendAfter(closure) } - internal func sharedExamples(name: String, closure: SharedExampleClosure) { + internal func sharedExamples(_ name: String, closure: @escaping SharedExampleClosure) { registerSharedExample(name, closure: closure) } - internal func describe(description: String, flags: FilterFlags, closure: () -> ()) { + internal func describe(_ description: String, flags: FilterFlags, closure: () -> ()) { guard currentExampleMetadata == nil else { raiseError("'describe' cannot be used inside '\(currentPhase)', 'describe' may only be used inside 'context' or 'describe'. ") } @@ -30,26 +30,26 @@ extension World { performWithCurrentExampleGroup(group, closure: closure) } - internal func context(description: String, flags: FilterFlags, closure: () -> ()) { + internal func context(_ description: String, flags: FilterFlags, closure: () -> ()) { guard currentExampleMetadata == nil else { raiseError("'context' cannot be used inside '\(currentPhase)', 'context' may only be used inside 'context' or 'describe'. ") } self.describe(description, flags: flags, closure: closure) } - internal func fdescribe(description: String, flags: FilterFlags, closure: () -> ()) { + internal func fdescribe(_ description: String, flags: FilterFlags, closure: () -> ()) { var focusedFlags = flags focusedFlags[Filter.focused] = true self.describe(description, flags: focusedFlags, closure: closure) } - internal func xdescribe(description: String, flags: FilterFlags, closure: () -> ()) { + internal func xdescribe(_ description: String, flags: FilterFlags, closure: () -> ()) { var pendingFlags = flags pendingFlags[Filter.pending] = true self.describe(description, flags: pendingFlags, closure: closure) } - internal func beforeEach(closure: BeforeExampleClosure) { + internal func beforeEach(_ closure: @escaping BeforeExampleClosure) { guard currentExampleMetadata == nil else { raiseError("'beforeEach' cannot be used inside '\(currentPhase)', 'beforeEach' may only be used inside 'context' or 'describe'. ") } @@ -58,16 +58,16 @@ extension World { #if _runtime(_ObjC) @objc(beforeEachWithMetadata:) - internal func beforeEach(closure closure: BeforeExampleWithMetadataClosure) { + internal func beforeEach(closure: @escaping BeforeExampleWithMetadataClosure) { currentExampleGroup.hooks.appendBefore(closure) } #else - internal func beforeEach(closure closure: BeforeExampleWithMetadataClosure) { + internal func beforeEach(closure: @escaping BeforeExampleWithMetadataClosure) { currentExampleGroup.hooks.appendBefore(closure) } #endif - internal func afterEach(closure: AfterExampleClosure) { + internal func afterEach(_ closure: @escaping AfterExampleClosure) { guard currentExampleMetadata == nil else { raiseError("'afterEach' cannot be used inside '\(currentPhase)', 'afterEach' may only be used inside 'context' or 'describe'. ") } @@ -76,16 +76,16 @@ extension World { #if _runtime(_ObjC) @objc(afterEachWithMetadata:) - internal func afterEach(closure closure: AfterExampleWithMetadataClosure) { + internal func afterEach(closure: @escaping AfterExampleWithMetadataClosure) { currentExampleGroup.hooks.appendAfter(closure) } #else - internal func afterEach(closure closure: AfterExampleWithMetadataClosure) { + internal func afterEach(closure: @escaping AfterExampleWithMetadataClosure) { currentExampleGroup.hooks.appendAfter(closure) } #endif - internal func it(description: String, flags: FilterFlags, file: String, line: UInt, closure: () -> ()) { + internal func it(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> ()) { if beforesCurrentlyExecuting { raiseError("'it' cannot be used inside 'beforeEach', 'it' may only be used inside 'context' or 'describe'. ") } @@ -100,19 +100,19 @@ extension World { currentExampleGroup.appendExample(example) } - internal func fit(description: String, flags: FilterFlags, file: String, line: UInt, closure: () -> ()) { + internal func fit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> ()) { var focusedFlags = flags focusedFlags[Filter.focused] = true self.it(description, flags: focusedFlags, file: file, line: line, closure: closure) } - internal func xit(description: String, flags: FilterFlags, file: String, line: UInt, closure: () -> ()) { + internal func xit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> ()) { var pendingFlags = flags pendingFlags[Filter.pending] = true self.it(description, flags: pendingFlags, file: file, line: line, closure: closure) } - internal func itBehavesLike(name: String, sharedExampleContext: SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { + internal func itBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { guard currentExampleMetadata == nil else { raiseError("'itBehavesLike' cannot be used inside '\(currentPhase)', 'itBehavesLike' may only be used inside 'context' or 'describe'. ") } @@ -133,27 +133,27 @@ extension World { #if _runtime(_ObjC) @objc(itWithDescription:flags:file:line:closure:) - private func objc_it(description: String, flags: FilterFlags, file: String, line: UInt, closure: () -> ()) { + private func objc_it(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> ()) { it(description, flags: flags, file: file, line: line, closure: closure) } @objc(fitWithDescription:flags:file:line:closure:) - private func objc_fit(description: String, flags: FilterFlags, file: String, line: UInt, closure: () -> ()) { + private func objc_fit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> ()) { fit(description, flags: flags, file: file, line: line, closure: closure) } @objc(xitWithDescription:flags:file:line:closure:) - private func objc_xit(description: String, flags: FilterFlags, file: String, line: UInt, closure: () -> ()) { + private func objc_xit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> ()) { xit(description, flags: flags, file: file, line: line, closure: closure) } @objc(itBehavesLikeSharedExampleNamed:sharedExampleContext:flags:file:line:) - private func objc_itBehavesLike(name: String, sharedExampleContext: SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { + private func objc_itBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: flags, file: file, line: line) } #endif - internal func pending(description: String, closure: () -> ()) { + internal func pending(_ description: String, closure: () -> ()) { print("Pending: \(description)") } diff --git a/Pods/Quick/Sources/Quick/ErrorUtility.swift b/Pods/Quick/Sources/Quick/ErrorUtility.swift index 3c4035a..8405a81 100644 --- a/Pods/Quick/Sources/Quick/ErrorUtility.swift +++ b/Pods/Quick/Sources/Quick/ErrorUtility.swift @@ -1,8 +1,8 @@ import Foundation -@noreturn internal func raiseError(message: String) { +internal func raiseError(_ message: String) -> Never { #if _runtime(_ObjC) - NSException(name: NSInternalInconsistencyException, reason: message, userInfo: nil).raise() + NSException(name: .internalInconsistencyException, reason: message, userInfo: nil).raise() #endif // This won't be reached when ObjC is available and the exception above is raisd diff --git a/Pods/Quick/Sources/Quick/Example.swift b/Pods/Quick/Sources/Quick/Example.swift index 8929525..844bf3f 100644 --- a/Pods/Quick/Sources/Quick/Example.swift +++ b/Pods/Quick/Sources/Quick/Example.swift @@ -26,7 +26,7 @@ final public class Example: NSObject { private let closure: () -> () private let flags: FilterFlags - internal init(description: String, callsite: Callsite, flags: FilterFlags, closure: () -> ()) { + internal init(description: String, callsite: Callsite, flags: FilterFlags, closure: @escaping () -> ()) { self.internalDescription = description self.closure = closure self.callsite = callsite @@ -46,10 +46,8 @@ final public class Example: NSObject { to be displayed in Xcode's test navigator. */ public var name: String { - switch group!.name { - case .Some(let groupName): return "\(groupName), \(description)" - case .None: return description - } + guard let groupName = group?.name else { return description } + return "\(groupName), \(description)" } /** @@ -67,19 +65,19 @@ final public class Example: NSObject { world.currentExampleMetadata = exampleMetadata world.exampleHooks.executeBefores(exampleMetadata) - group!.phase = .BeforesExecuting + group!.phase = .beforesExecuting for before in group!.befores { - before(exampleMetadata: exampleMetadata) + before(exampleMetadata) } - group!.phase = .BeforesFinished + group!.phase = .beforesFinished closure() - group!.phase = .AftersExecuting + group!.phase = .aftersExecuting for after in group!.afters { - after(exampleMetadata: exampleMetadata) + after(exampleMetadata) } - group!.phase = .AftersFinished + group!.phase = .aftersFinished world.exampleHooks.executeAfters(exampleMetadata) numberOfExamplesRun += 1 diff --git a/Pods/Quick/Sources/Quick/ExampleGroup.swift b/Pods/Quick/Sources/Quick/ExampleGroup.swift index cf2b983..b0b8be4 100644 --- a/Pods/Quick/Sources/Quick/ExampleGroup.swift +++ b/Pods/Quick/Sources/Quick/ExampleGroup.swift @@ -9,7 +9,7 @@ final public class ExampleGroup: NSObject { weak internal var parent: ExampleGroup? internal let hooks = ExampleHooks() - internal var phase: HooksPhase = .NothingExecuted + internal var phase: HooksPhase = .nothingExecuted private let internalDescription: String private let flags: FilterFlags @@ -34,17 +34,15 @@ final public class ExampleGroup: NSObject { public var examples: [Example] { var examples = childExamples for group in childGroups { - examples.appendContentsOf(group.examples) + examples.append(contentsOf: group.examples) } return examples } internal var name: String? { if let parent = parent { - switch(parent.name) { - case .Some(let name): return "\(name), \(description)" - case .None: return description - } + guard let name = parent.name else { return description } + return "\(name), \(description)" } else { return isInternalRootExampleGroup ? nil : description } @@ -61,44 +59,44 @@ final public class ExampleGroup: NSObject { } internal var befores: [BeforeExampleWithMetadataClosure] { - var closures = Array(hooks.befores.reverse()) + var closures = Array(hooks.befores.reversed()) walkUp() { (group: ExampleGroup) -> () in - closures.appendContentsOf(Array(group.hooks.befores.reverse())) + closures.append(contentsOf: Array(group.hooks.befores.reversed())) } - return Array(closures.reverse()) + return Array(closures.reversed()) } internal var afters: [AfterExampleWithMetadataClosure] { var closures = hooks.afters walkUp() { (group: ExampleGroup) -> () in - closures.appendContentsOf(group.hooks.afters) + closures.append(contentsOf: group.hooks.afters) } return closures } - internal func walkDownExamples(callback: (example: Example) -> ()) { + internal func walkDownExamples(_ callback: (_ example: Example) -> ()) { for example in childExamples { - callback(example: example) + callback(example) } for group in childGroups { group.walkDownExamples(callback) } } - internal func appendExampleGroup(group: ExampleGroup) { + internal func appendExampleGroup(_ group: ExampleGroup) { group.parent = self childGroups.append(group) } - internal func appendExample(example: Example) { + internal func appendExample(_ example: Example) { example.group = self childExamples.append(example) } - private func walkUp(callback: (group: ExampleGroup) -> ()) { + private func walkUp(_ callback: (_ group: ExampleGroup) -> ()) { var group = self while let parent = group.parent { - callback(group: parent) + callback(parent) group = parent } } diff --git a/Pods/Quick/Sources/Quick/Hooks/Closures.swift b/Pods/Quick/Sources/Quick/Hooks/Closures.swift index 3252bbf..a241b33 100644 --- a/Pods/Quick/Sources/Quick/Hooks/Closures.swift +++ b/Pods/Quick/Sources/Quick/Hooks/Closures.swift @@ -9,7 +9,7 @@ public typealias BeforeExampleClosure = () -> () A closure executed before an example is run. The closure is given example metadata, which contains information about the example that is about to be run. */ -public typealias BeforeExampleWithMetadataClosure = (exampleMetadata: ExampleMetadata) -> () +public typealias BeforeExampleWithMetadataClosure = (_ exampleMetadata: ExampleMetadata) -> () /** A closure executed after an example is run. diff --git a/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift b/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift index 1d5fa91..ef6d53e 100644 --- a/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift +++ b/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift @@ -4,39 +4,39 @@ final internal class ExampleHooks { internal var befores: [BeforeExampleWithMetadataClosure] = [] internal var afters: [AfterExampleWithMetadataClosure] = [] - internal var phase: HooksPhase = .NothingExecuted + internal var phase: HooksPhase = .nothingExecuted - internal func appendBefore(closure: BeforeExampleWithMetadataClosure) { + internal func appendBefore(_ closure: @escaping BeforeExampleWithMetadataClosure) { befores.append(closure) } - internal func appendBefore(closure: BeforeExampleClosure) { + internal func appendBefore(_ closure: @escaping BeforeExampleClosure) { befores.append { (exampleMetadata: ExampleMetadata) in closure() } } - internal func appendAfter(closure: AfterExampleWithMetadataClosure) { + internal func appendAfter(_ closure: @escaping AfterExampleWithMetadataClosure) { afters.append(closure) } - internal func appendAfter(closure: AfterExampleClosure) { + internal func appendAfter(_ closure: @escaping AfterExampleClosure) { afters.append { (exampleMetadata: ExampleMetadata) in closure() } } - internal func executeBefores(exampleMetadata: ExampleMetadata) { - phase = .BeforesExecuting + internal func executeBefores(_ exampleMetadata: ExampleMetadata) { + phase = .beforesExecuting for before in befores { - before(exampleMetadata: exampleMetadata) + before(exampleMetadata) } - phase = .BeforesFinished + phase = .beforesFinished } - internal func executeAfters(exampleMetadata: ExampleMetadata) { - phase = .AftersExecuting + internal func executeAfters(_ exampleMetadata: ExampleMetadata) { + phase = .aftersExecuting for after in afters { - after(exampleMetadata: exampleMetadata) + after(exampleMetadata) } - phase = .AftersFinished + phase = .aftersFinished } } diff --git a/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift b/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift index 8dc3784..2440158 100644 --- a/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift +++ b/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift @@ -2,10 +2,10 @@ A description of the execution cycle of the current example with respect to the hooks of that example. */ -internal enum HooksPhase: Int { - case NothingExecuted = 0 - case BeforesExecuting - case BeforesFinished - case AftersExecuting - case AftersFinished +internal enum HooksPhase { + case nothingExecuted + case beforesExecuting + case beforesFinished + case aftersExecuting + case aftersFinished } diff --git a/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift b/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift index 59bdcf2..b39292b 100644 --- a/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift +++ b/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift @@ -4,29 +4,29 @@ final internal class SuiteHooks { internal var befores: [BeforeSuiteClosure] = [] internal var afters: [AfterSuiteClosure] = [] - internal var phase: HooksPhase = .NothingExecuted + internal var phase: HooksPhase = .nothingExecuted - internal func appendBefore(closure: BeforeSuiteClosure) { + internal func appendBefore(_ closure: @escaping BeforeSuiteClosure) { befores.append(closure) } - internal func appendAfter(closure: AfterSuiteClosure) { + internal func appendAfter(_ closure: @escaping AfterSuiteClosure) { afters.append(closure) } internal func executeBefores() { - phase = .BeforesExecuting + phase = .beforesExecuting for before in befores { before() } - phase = .BeforesFinished + phase = .beforesFinished } internal func executeAfters() { - phase = .AftersExecuting + phase = .aftersExecuting for after in afters { after() } - phase = .AftersFinished + phase = .aftersFinished } } diff --git a/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift b/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift index e8709e0..730843e 100644 --- a/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift +++ b/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift @@ -2,17 +2,13 @@ import Foundation -extension NSBundle { +extension Bundle { /** Locates the first bundle with a '.xctest' file extension. */ - internal static var currentTestBundle: NSBundle? { - return allBundles().lazy - .filter { - $0.bundlePath.hasSuffix(".xctest") - } - .first + internal static var currentTestBundle: Bundle? { + return allBundles.first { $0.bundlePath.hasSuffix(".xctest") } } } diff --git a/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift b/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift index 5163a4e..63b55e1 100644 --- a/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift +++ b/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift @@ -1,4 +1,5 @@ #if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) +import Foundation /** Responsible for building a "Selected tests" suite. This corresponds to a single @@ -50,18 +51,18 @@ internal class QuickSelectedTestSuiteBuilder: QuickTestSuiteBuilder { } /** - Searches `NSBundle.allBundles()` for an xctest bundle, then looks up the named + Searches `Bundle.allBundles()` for an xctest bundle, then looks up the named test case class in that bundle. Returns `nil` if a bundle or test case class cannot be found. */ -private func testCaseClassForTestCaseWithName(name: String) -> AnyClass? { - func extractClassName(name: String) -> String? { - return name.characters.split("/").first.map(String.init) +private func testCaseClassForTestCaseWithName(_ name: String) -> AnyClass? { + func extractClassName(_ name: String) -> String? { + return name.components(separatedBy: "/").first } guard let className = extractClassName(name) else { return nil } - guard let bundle = NSBundle.currentTestBundle else { return nil } + guard let bundle = Bundle.currentTestBundle else { return nil } if let testCaseClass = bundle.classNamed(className) { return testCaseClass } diff --git a/Pods/Quick/Sources/Quick/String+FileName.swift b/Pods/Quick/Sources/Quick/String+FileName.swift index 87cea7a..83cdfcf 100644 --- a/Pods/Quick/Sources/Quick/String+FileName.swift +++ b/Pods/Quick/Sources/Quick/String+FileName.swift @@ -6,7 +6,7 @@ extension String { If the receiver represents a path, returns its file name with a file extension. */ var fileName: String? { - return NSURL(string: self)?.URLByDeletingPathExtension?.lastPathComponent + return NSURL(string: self)?.deletingPathExtension?.lastPathComponent } } diff --git a/Pods/Quick/Sources/Quick/World.swift b/Pods/Quick/Sources/Quick/World.swift index b2b58c8..56dae51 100644 --- a/Pods/Quick/Sources/Quick/World.swift +++ b/Pods/Quick/Sources/Quick/World.swift @@ -10,7 +10,7 @@ public typealias SharedExampleContext = () -> (NSDictionary) A closure that is used to define a group of shared examples. This closure may contain any number of example and example groups. */ -public typealias SharedExampleClosure = (SharedExampleContext) -> () +public typealias SharedExampleClosure = (@escaping SharedExampleContext) -> () /** A collection of state Quick builds up in order to work its magic. @@ -44,7 +44,13 @@ final internal class World: NSObject { within this test suite. This is only true within the context of Quick functional tests. */ +#if _runtime(_ObjC) + // Convention of generating Objective-C selector has been changed on Swift 3 + @objc(isRunningAdditionalSuites) + internal var isRunningAdditionalSuites = false +#else internal var isRunningAdditionalSuites = false +#endif private var specs: Dictionary = [:] private var sharedExamples: [String: SharedExampleClosure] = [:] @@ -69,10 +75,10 @@ final internal class World: NSObject { - parameter closure: A closure that takes a Configuration object that can be mutated to change Quick's behavior. */ - internal func configure(closure: QuickConfigurer) { + internal func configure(_ closure: QuickConfigurer) { assert(!isConfigurationFinalized, "Quick cannot be configured outside of a +[QuickConfiguration configure:] method. You should not call -[World configure:] directly. Instead, subclass QuickConfiguration and override the +[QuickConfiguration configure:] method.") - closure(configuration: configuration) + closure(configuration) } /** @@ -101,12 +107,8 @@ final internal class World: NSObject { - parameter cls: The QuickSpec class for which to retrieve the root example group. - returns: The root example group for the class. */ - internal func rootExampleGroupForSpecClass(cls: AnyClass) -> ExampleGroup { - #if _runtime(_ObjC) - let name = NSStringFromClass(cls) - #else - let name = String(cls) - #endif + internal func rootExampleGroupForSpecClass(_ cls: AnyClass) -> ExampleGroup { + let name = String(describing: cls) if let group = specs[name] { return group @@ -130,32 +132,32 @@ final internal class World: NSObject { - parameter specClass: The QuickSpec subclass for which examples are to be returned. - returns: A list of examples to be run as test invocations. */ - internal func examples(specClass: AnyClass) -> [Example] { + internal func examples(_ specClass: AnyClass) -> [Example] { // 1. Grab all included examples. let included = includedExamples // 2. Grab the intersection of (a) examples for this spec, and (b) included examples. let spec = rootExampleGroupForSpecClass(specClass).examples.filter { included.contains($0) } // 3. Remove all excluded examples. return spec.filter { example in - !self.configuration.exclusionFilters.reduce(false) { $0 || $1(example: example) } + !self.configuration.exclusionFilters.reduce(false) { $0 || $1(example) } } } #if _runtime(_ObjC) @objc(examplesForSpecClass:) - private func objc_examples(specClass: AnyClass) -> [Example] { + private func objc_examples(_ specClass: AnyClass) -> [Example] { return examples(specClass) } #endif // MARK: Internal - internal func registerSharedExample(name: String, closure: SharedExampleClosure) { + internal func registerSharedExample(_ name: String, closure: @escaping SharedExampleClosure) { raiseIfSharedExampleAlreadyRegistered(name) sharedExamples[name] = closure } - internal func sharedExample(name: String) -> SharedExampleClosure { + internal func sharedExample(_ name: String) -> SharedExampleClosure { raiseIfSharedExampleNotRegistered(name) return sharedExamples[name]! } @@ -165,28 +167,28 @@ final internal class World: NSObject { } internal var beforesCurrentlyExecuting: Bool { - let suiteBeforesExecuting = suiteHooks.phase == .BeforesExecuting - let exampleBeforesExecuting = exampleHooks.phase == .BeforesExecuting + let suiteBeforesExecuting = suiteHooks.phase == .beforesExecuting + let exampleBeforesExecuting = exampleHooks.phase == .beforesExecuting var groupBeforesExecuting = false if let runningExampleGroup = currentExampleMetadata?.example.group { - groupBeforesExecuting = runningExampleGroup.phase == .BeforesExecuting + groupBeforesExecuting = runningExampleGroup.phase == .beforesExecuting } return suiteBeforesExecuting || exampleBeforesExecuting || groupBeforesExecuting } internal var aftersCurrentlyExecuting: Bool { - let suiteAftersExecuting = suiteHooks.phase == .AftersExecuting - let exampleAftersExecuting = exampleHooks.phase == .AftersExecuting + let suiteAftersExecuting = suiteHooks.phase == .aftersExecuting + let exampleAftersExecuting = exampleHooks.phase == .aftersExecuting var groupAftersExecuting = false if let runningExampleGroup = currentExampleMetadata?.example.group { - groupAftersExecuting = runningExampleGroup.phase == .AftersExecuting + groupAftersExecuting = runningExampleGroup.phase == .aftersExecuting } return suiteAftersExecuting || exampleAftersExecuting || groupAftersExecuting } - internal func performWithCurrentExampleGroup(group: ExampleGroup, closure: () -> Void) { + internal func performWithCurrentExampleGroup(_ group: ExampleGroup, closure: () -> Void) { let previousExampleGroup = currentExampleGroup currentExampleGroup = group @@ -206,7 +208,7 @@ final internal class World: NSObject { private var includedExamples: [Example] { let all = allExamples let included = all.filter { example in - return self.configuration.inclusionFilters.reduce(false) { $0 || $1(example: example) } + return self.configuration.inclusionFilters.reduce(false) { $0 || $1(example) } } if included.isEmpty && configuration.runAllWhenEverythingFiltered { @@ -216,13 +218,13 @@ final internal class World: NSObject { } } - private func raiseIfSharedExampleAlreadyRegistered(name: String) { + private func raiseIfSharedExampleAlreadyRegistered(_ name: String) { if sharedExamples[name] != nil { raiseError("A shared example named '\(name)' has already been registered.") } } - private func raiseIfSharedExampleNotRegistered(name: String) { + private func raiseIfSharedExampleNotRegistered(_ name: String) { if sharedExamples[name] == nil { raiseError("No shared example named '\(name)' has been registered. Registered shared examples: '\(Array(sharedExamples.keys))'") } diff --git a/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.h b/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h similarity index 100% rename from Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.h rename to Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h diff --git a/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.m b/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m similarity index 100% rename from Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.m rename to Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m diff --git a/Pods/Quick/Sources/Quick/DSL/QCKDSL.h b/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h similarity index 100% rename from Pods/Quick/Sources/Quick/DSL/QCKDSL.h rename to Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h diff --git a/Pods/Quick/Sources/Quick/DSL/QCKDSL.m b/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m similarity index 100% rename from Pods/Quick/Sources/Quick/DSL/QCKDSL.m rename to Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m diff --git a/Pods/Quick/Sources/Quick/DSL/World+DSL.h b/Pods/Quick/Sources/QuickObjectiveC/DSL/World+DSL.h similarity index 100% rename from Pods/Quick/Sources/Quick/DSL/World+DSL.h rename to Pods/Quick/Sources/QuickObjectiveC/DSL/World+DSL.h diff --git a/Pods/Quick/Sources/Quick/NSString+QCKSelectorName.h b/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.h similarity index 100% rename from Pods/Quick/Sources/Quick/NSString+QCKSelectorName.h rename to Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.h diff --git a/Pods/Quick/Sources/Quick/NSString+QCKSelectorName.m b/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.m similarity index 100% rename from Pods/Quick/Sources/Quick/NSString+QCKSelectorName.m rename to Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.m diff --git a/Pods/Quick/Sources/Quick/Quick.h b/Pods/Quick/Sources/QuickObjectiveC/Quick.h similarity index 100% rename from Pods/Quick/Sources/Quick/Quick.h rename to Pods/Quick/Sources/QuickObjectiveC/Quick.h diff --git a/Pods/Quick/Sources/Quick/QuickSpec.h b/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h similarity index 100% rename from Pods/Quick/Sources/Quick/QuickSpec.h rename to Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h diff --git a/Pods/Quick/Sources/Quick/QuickSpec.m b/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m similarity index 100% rename from Pods/Quick/Sources/Quick/QuickSpec.m rename to Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m diff --git a/Pods/Quick/Sources/Quick/World.h b/Pods/Quick/Sources/QuickObjectiveC/World.h similarity index 100% rename from Pods/Quick/Sources/Quick/World.h rename to Pods/Quick/Sources/QuickObjectiveC/World.h diff --git a/Pods/Quick/Sources/Quick/XCTestSuite+QuickTestSuiteBuilder.m b/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m similarity index 100% rename from Pods/Quick/Sources/Quick/XCTestSuite+QuickTestSuiteBuilder.m rename to Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m diff --git a/Pods/Target Support Files/Nimble/Info.plist b/Pods/Target Support Files/Nimble/Info.plist index c26f36f..073e064 100644 --- a/Pods/Target Support Files/Nimble/Info.plist +++ b/Pods/Target Support Files/Nimble/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.1.0 + 5.1.0 CFBundleSignature ???? CFBundleVersion diff --git a/Pods/Target Support Files/Nimble/Nimble-umbrella.h b/Pods/Target Support Files/Nimble/Nimble-umbrella.h index 3701312..410c438 100644 --- a/Pods/Target Support Files/Nimble/Nimble-umbrella.h +++ b/Pods/Target Support Files/Nimble/Nimble-umbrella.h @@ -1,9 +1,12 @@ #import +#import "CwlCatchException.h" +#import "CwlCatchBadInstruction.h" +#import "mach_excServer.h" +#import "Nimble.h" #import "DSL.h" #import "NMBExceptionCapture.h" #import "NMBStringify.h" -#import "Nimble.h" FOUNDATION_EXPORT double NimbleVersionNumber; FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; diff --git a/Pods/Target Support Files/Quick/Info.plist b/Pods/Target Support Files/Quick/Info.plist index b8a90bb..994ffe8 100644 --- a/Pods/Target Support Files/Quick/Info.plist +++ b/Pods/Target Support Files/Quick/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.9.3 + 0.10.0 CFBundleSignature ???? CFBundleVersion From c0941c2f1e3172691136124e27b2d1ba880e55b3 Mon Sep 17 00:00:00 2001 From: stephengazzard Date: Wed, 26 Oct 2016 10:50:06 -0600 Subject: [PATCH 05/11] Pod install R&P Fork of Nocilla --- Podfile | 2 +- Podfile.lock | 10 ++++- Pods/Local Podspecs/Nocilla.podspec.json | 39 ++++++++++++++++++++ Pods/Manifest.lock | 10 ++++- Pods/Nocilla/Nocilla/DSL/LSStubRequestDSL.h | 32 ++++++++-------- Pods/Nocilla/Nocilla/DSL/LSStubResponseDSL.h | 14 +++---- 6 files changed, 79 insertions(+), 28 deletions(-) create mode 100644 Pods/Local Podspecs/Nocilla.podspec.json diff --git a/Podfile b/Podfile index 338686b..4b6d651 100644 --- a/Podfile +++ b/Podfile @@ -17,6 +17,6 @@ target 'Astro' do pod 'Quick', '~> 0.10' pod 'Nimble', '~> 5.0' - pod 'Nocilla', '~> 0.11' + pod 'Nocilla', :git => 'git@github.com:RobotsAndPencils/Nocilla.git', :branch => 'swift/3.0' end end diff --git a/Podfile.lock b/Podfile.lock index 2654087..1cfd10e 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -27,18 +27,24 @@ DEPENDENCIES: - Astro (from `.`) - Freddy (~> 3.0) - Nimble (~> 5.0) - - Nocilla (~> 0.11) + - Nocilla (from `git@github.com:RobotsAndPencils/Nocilla.git`, branch `swift/3.0`) - Quick (~> 0.10) - SwiftTask (from `https://github.com/ReactKit/SwiftTask`, branch `swift/3.0`) EXTERNAL SOURCES: Astro: :path: . + Nocilla: + :branch: swift/3.0 + :git: git@github.com:RobotsAndPencils/Nocilla.git SwiftTask: :branch: swift/3.0 :git: https://github.com/ReactKit/SwiftTask CHECKOUT OPTIONS: + Nocilla: + :commit: 4793459646076a6ce66137133cc4cfe6e5b9543a + :git: git@github.com:RobotsAndPencils/Nocilla.git SwiftTask: :commit: fb4af8a4e853eb62f0418f870cfb9ae1cf618961 :git: https://github.com/ReactKit/SwiftTask @@ -52,6 +58,6 @@ SPEC CHECKSUMS: Quick: 5d290df1c69d5ee2f0729956dcf0fd9a30447eaa SwiftTask: 7fcd92f8ac16876e82c0e4ced0cea7e028456b6b -PODFILE CHECKSUM: 489eeec715b8a99a1bb79ae399495b01cd1d529b +PODFILE CHECKSUM: c60266fc7f95a73234e164950072d9c6c2089643 COCOAPODS: 1.1.0.rc.2 diff --git a/Pods/Local Podspecs/Nocilla.podspec.json b/Pods/Local Podspecs/Nocilla.podspec.json new file mode 100644 index 0000000..c561927 --- /dev/null +++ b/Pods/Local Podspecs/Nocilla.podspec.json @@ -0,0 +1,39 @@ +{ + "name": "Nocilla", + "version": "0.11.0", + "summary": "Stunning HTTP stubbing for iOS. Testing HTTP requests has never been easier.", + "homepage": "https://github.com/luisobo/Nocilla", + "license": { + "type": "MIT", + "file": "LICENSE" + }, + "authors": { + "Luis Solano": "contact@luissolano.com" + }, + "source": { + "git": "https://github.com/luisobo/Nocilla.git", + "tag": "0.11.0" + }, + "platforms": { + "ios": "5.0", + "osx": "10.7", + "tvos": "9.0" + }, + "source_files": "Nocilla/**/*.{h,m}", + "public_header_files": [ + "Nocilla/Categories/NSData+Nocilla.h", + "Nocilla/Categories/NSString+Nocilla.h", + "Nocilla/DSL/LSStubRequestDSL.h", + "Nocilla/DSL/LSStubResponseDSL.h", + "Nocilla/LSNocilla.h", + "Nocilla/Matchers/LSMatcheable.h", + "Nocilla/Matchers/LSMatcher.h", + "Nocilla/Matchers/NSData+Matcheable.h", + "Nocilla/Matchers/NSRegularExpression+Matcheable.h", + "Nocilla/Matchers/NSString+Matcheable.h", + "Nocilla/Model/LSHTTPBody.h", + "Nocilla/Nocilla.h" + ], + "requires_arc": true, + "frameworks": "CFNetwork" +} diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock index 2654087..1cfd10e 100644 --- a/Pods/Manifest.lock +++ b/Pods/Manifest.lock @@ -27,18 +27,24 @@ DEPENDENCIES: - Astro (from `.`) - Freddy (~> 3.0) - Nimble (~> 5.0) - - Nocilla (~> 0.11) + - Nocilla (from `git@github.com:RobotsAndPencils/Nocilla.git`, branch `swift/3.0`) - Quick (~> 0.10) - SwiftTask (from `https://github.com/ReactKit/SwiftTask`, branch `swift/3.0`) EXTERNAL SOURCES: Astro: :path: . + Nocilla: + :branch: swift/3.0 + :git: git@github.com:RobotsAndPencils/Nocilla.git SwiftTask: :branch: swift/3.0 :git: https://github.com/ReactKit/SwiftTask CHECKOUT OPTIONS: + Nocilla: + :commit: 4793459646076a6ce66137133cc4cfe6e5b9543a + :git: git@github.com:RobotsAndPencils/Nocilla.git SwiftTask: :commit: fb4af8a4e853eb62f0418f870cfb9ae1cf618961 :git: https://github.com/ReactKit/SwiftTask @@ -52,6 +58,6 @@ SPEC CHECKSUMS: Quick: 5d290df1c69d5ee2f0729956dcf0fd9a30447eaa SwiftTask: 7fcd92f8ac16876e82c0e4ced0cea7e028456b6b -PODFILE CHECKSUM: 489eeec715b8a99a1bb79ae399495b01cd1d529b +PODFILE CHECKSUM: c60266fc7f95a73234e164950072d9c6c2089643 COCOAPODS: 1.1.0.rc.2 diff --git a/Pods/Nocilla/Nocilla/DSL/LSStubRequestDSL.h b/Pods/Nocilla/Nocilla/DSL/LSStubRequestDSL.h index d7df743..234db0c 100644 --- a/Pods/Nocilla/Nocilla/DSL/LSStubRequestDSL.h +++ b/Pods/Nocilla/Nocilla/DSL/LSStubRequestDSL.h @@ -9,31 +9,31 @@ @protocol LSHTTPBody; -typedef LSStubRequestDSL *(^WithHeaderMethod)(NSString *, NSString *); -typedef LSStubRequestDSL *(^WithHeadersMethod)(NSDictionary *); -typedef LSStubRequestDSL *(^AndBodyMethod)(id); -typedef LSStubResponseDSL *(^AndReturnMethod)(NSInteger); -typedef LSStubResponseDSL *(^AndReturnRawResponseMethod)(NSData *rawResponseData); -typedef void (^AndFailWithErrorMethod)(NSError *error); +typedef LSStubRequestDSL * _Nonnull (^WithHeaderMethod)(NSString * _Nonnull, NSString * _Nullable); +typedef LSStubRequestDSL * _Nonnull (^WithHeadersMethod)(NSDictionary * _Nullable); +typedef LSStubRequestDSL * _Nonnull (^AndBodyMethod)(_Nullable id); +typedef LSStubResponseDSL * _Nonnull (^AndReturnMethod)(NSInteger); +typedef LSStubResponseDSL * _Nonnull (^AndReturnRawResponseMethod)(NSData * _Nonnull rawResponseData); +typedef void (^AndFailWithErrorMethod)(NSError * _Nonnull error); @interface LSStubRequestDSL : NSObject -- (id)initWithRequest:(LSStubRequest *)request; +- (id _Nonnull)initWithRequest:(LSStubRequest * _Nonnull)request; -@property (nonatomic, strong, readonly) WithHeaderMethod withHeader; -@property (nonatomic, strong, readonly) WithHeadersMethod withHeaders; -@property (nonatomic, strong, readonly) AndBodyMethod withBody; -@property (nonatomic, strong, readonly) AndReturnMethod andReturn; -@property (nonatomic, strong, readonly) AndReturnRawResponseMethod andReturnRawResponse; -@property (nonatomic, strong, readonly) AndFailWithErrorMethod andFailWithError; +@property (nonatomic, strong, readonly) _Nonnull WithHeaderMethod withHeader; +@property (nonatomic, strong, readonly) _Nonnull WithHeadersMethod withHeaders; +@property (nonatomic, strong, readonly) _Nonnull AndBodyMethod withBody; +@property (nonatomic, strong, readonly) _Nonnull AndReturnMethod andReturn; +@property (nonatomic, strong, readonly) _Nonnull AndReturnRawResponseMethod andReturnRawResponse; +@property (nonatomic, strong, readonly) _Nonnull AndFailWithErrorMethod andFailWithError; @end #ifdef __cplusplus extern "C" { #endif - -LSStubRequestDSL * stubRequest(NSString *method, id url); - + +LSStubRequestDSL * _Nonnull stubRequest(NSString * _Nullable method, _Nonnull id url); + #ifdef __cplusplus } #endif diff --git a/Pods/Nocilla/Nocilla/DSL/LSStubResponseDSL.h b/Pods/Nocilla/Nocilla/DSL/LSStubResponseDSL.h index 2ba6b66..9b396cd 100644 --- a/Pods/Nocilla/Nocilla/DSL/LSStubResponseDSL.h +++ b/Pods/Nocilla/Nocilla/DSL/LSStubResponseDSL.h @@ -5,15 +5,15 @@ @protocol LSHTTPBody; -typedef LSStubResponseDSL *(^ResponseWithBodyMethod)(id); -typedef LSStubResponseDSL *(^ResponseWithHeaderMethod)(NSString *, NSString *); -typedef LSStubResponseDSL *(^ResponseWithHeadersMethod)(NSDictionary *); +typedef LSStubResponseDSL * _Nonnull (^ResponseWithBodyMethod)(_Nullable id); +typedef LSStubResponseDSL * _Nonnull (^ResponseWithHeaderMethod)(NSString * _Nonnull, NSString * _Nullable); +typedef LSStubResponseDSL * _Nonnull (^ResponseWithHeadersMethod)(NSDictionary * _Nonnull); @interface LSStubResponseDSL : NSObject -- (id)initWithResponse:(LSStubResponse *)response; +- (id _Nonnull)initWithResponse:(LSStubResponse * _Nonnull)response; -@property (nonatomic, strong, readonly) ResponseWithHeaderMethod withHeader; -@property (nonatomic, strong, readonly) ResponseWithHeadersMethod withHeaders; -@property (nonatomic, strong, readonly) ResponseWithBodyMethod withBody; +@property (nonatomic, strong, readonly) _Nonnull ResponseWithHeaderMethod withHeader; +@property (nonatomic, strong, readonly) _Nonnull ResponseWithHeadersMethod withHeaders; +@property (nonatomic, strong, readonly) _Nonnull ResponseWithBodyMethod withBody; @end From 4409e3d7feb50a41a906db8a98646cc8f8ca053d Mon Sep 17 00:00:00 2001 From: stephengazzard Date: Wed, 26 Oct 2016 09:07:15 -0600 Subject: [PATCH 06/11] Bump unit test deployment target to 9 --- Astro.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Astro.xcodeproj/project.pbxproj b/Astro.xcodeproj/project.pbxproj index 3f72aa5..766d29c 100644 --- a/Astro.xcodeproj/project.pbxproj +++ b/Astro.xcodeproj/project.pbxproj @@ -695,6 +695,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; INFOPLIST_FILE = AstroTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)"; PRODUCT_BUNDLE_IDENTIFIER = RNP.AstroTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -708,6 +709,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; INFOPLIST_FILE = AstroTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)"; PRODUCT_BUNDLE_IDENTIFIER = RNP.AstroTests; PRODUCT_NAME = "$(TARGET_NAME)"; From 520f2c52e5a8f7ed5e05a21422d1259b6c62a8f5 Mon Sep 17 00:00:00 2001 From: stephengazzard Date: Wed, 26 Oct 2016 09:53:24 -0600 Subject: [PATCH 07/11] Syntax fixes for unit test target --- .../Unit Tests/Logging/LoggerSpec.swift | 24 +++---- .../Networking/HTTPStatusCodeSpec.swift | 38 ++++++------ .../Networking/NetworkRequestLoggerSpec.swift | 16 ++--- .../Networking/NetworkServiceSpec.swift | 62 +++++++++---------- AstroTests/Unit Tests/Networking/User.swift | 12 ++-- AstroTests/Unit Tests/SpecHelpers.swift | 11 ++-- .../Unit Tests/UI/LayoutLabelSpec.swift | 14 ++--- .../UI/UIView+AstroGadgetsSpec.swift | 6 +- 8 files changed, 93 insertions(+), 90 deletions(-) diff --git a/AstroTests/Unit Tests/Logging/LoggerSpec.swift b/AstroTests/Unit Tests/Logging/LoggerSpec.swift index 2d62b3f..2bc6d5e 100644 --- a/AstroTests/Unit Tests/Logging/LoggerSpec.swift +++ b/AstroTests/Unit Tests/Logging/LoggerSpec.swift @@ -50,7 +50,7 @@ class LogSpec: QuickSpec { describe("Given we are logging at the Debug level") { beforeEach { - Log.level = .Debug + Log.level = .debug generateLogs() } @@ -62,7 +62,7 @@ class LogSpec: QuickSpec { describe("Given we are logging at the Info level") { beforeEach { - Log.level = .Info + Log.level = .info generateLogs() } @@ -74,7 +74,7 @@ class LogSpec: QuickSpec { describe("Given we are logging at the Warning level") { beforeEach { - Log.level = .Warning + Log.level = .warning generateLogs() } @@ -86,7 +86,7 @@ class LogSpec: QuickSpec { describe("Given we are logging at the Error level") { beforeEach { - Log.level = .Error + Log.level = .error generateLogs() } @@ -98,7 +98,7 @@ class LogSpec: QuickSpec { describe("Given we are logging at the Silent level") { beforeEach { - Log.level = .Silent + Log.level = .silent generateLogs() } @@ -108,11 +108,11 @@ class LogSpec: QuickSpec { } struct VeryExpensiveThingToPrint : CustomStringConvertible { - static let interval: NSTimeInterval = 100 - static let testThreshold: NSTimeInterval = 10 + static let interval: TimeInterval = 100 + static let testThreshold: TimeInterval = 10 var description: String { - NSThread.sleepForTimeInterval(VeryExpensiveThingToPrint.interval) + Thread.sleep(forTimeInterval: VeryExpensiveThingToPrint.interval) return "thing" } } @@ -120,15 +120,15 @@ class LogSpec: QuickSpec { describe("Given we are logging a really expensive statement") { let thing = VeryExpensiveThingToPrint() - var logInterval: NSTimeInterval! + var logInterval: TimeInterval! beforeEach { - Log.level = .Silent + Log.level = .silent - let start = NSDate() + let start = Date() Log.debug("Really expensive log statement: \(thing)") - logInterval = NSDate().timeIntervalSinceDate(start) + logInterval = Date().timeIntervalSince(start) } context("when that statement is not displayed because it's exclude by the logging level") { it("then it should not log anything") { diff --git a/AstroTests/Unit Tests/Networking/HTTPStatusCodeSpec.swift b/AstroTests/Unit Tests/Networking/HTTPStatusCodeSpec.swift index 083155c..e5aa270 100644 --- a/AstroTests/Unit Tests/Networking/HTTPStatusCodeSpec.swift +++ b/AstroTests/Unit Tests/Networking/HTTPStatusCodeSpec.swift @@ -20,9 +20,9 @@ class HTTPStatusCodeSpec: QuickSpec { it("then we should get the expected status code") { // Arrange // Act - let statusCode = HTTPStatusCode(intValue: HTTPStatusCode.Code200OK.rawValue) + let statusCode = HTTPStatusCode(intValue: HTTPStatusCode.code200OK.rawValue) // Assert - expect(statusCode).to(equal(HTTPStatusCode.Code200OK)) + expect(statusCode).to(equal(HTTPStatusCode.code200OK)) } } context("when using an enum value that does not exist") { @@ -39,43 +39,43 @@ class HTTPStatusCodeSpec: QuickSpec { describe("Given a Status Code") { context("when the code between 100 and 199"){ it("then it should have an informational status"){ - expect(HTTPStatusCode.Code100Continue.isInformational).to(beTrue()) - expect(HTTPStatusCode.Code200OK.isInformational).to(beFalse()) + expect(HTTPStatusCode.code100Continue.isInformational).to(beTrue()) + expect(HTTPStatusCode.code200OK.isInformational).to(beFalse()) } } context("when the code between 200 and 299"){ it("then it should have a successful status"){ - expect(HTTPStatusCode.Code101SwitchingProtocols.isSuccessful).to(beFalse()) - expect(HTTPStatusCode.Code200OK.isSuccessful).to(beTrue()) - expect(HTTPStatusCode.Code300MultipleChoices.isSuccessful).to(beFalse()) + expect(HTTPStatusCode.code101SwitchingProtocols.isSuccessful).to(beFalse()) + expect(HTTPStatusCode.code200OK.isSuccessful).to(beTrue()) + expect(HTTPStatusCode.code300MultipleChoices.isSuccessful).to(beFalse()) } } context("when the code between 300 and 399"){ it("then should have a redirection status"){ - expect(HTTPStatusCode.Code206PartialContent.isRedirection).to(beFalse()) - expect(HTTPStatusCode.Code300MultipleChoices.isRedirection).to(beTrue()) - expect(HTTPStatusCode.Code400BadRequest.isRedirection).to(beFalse()) + expect(HTTPStatusCode.code206PartialContent.isRedirection).to(beFalse()) + expect(HTTPStatusCode.code300MultipleChoices.isRedirection).to(beTrue()) + expect(HTTPStatusCode.code400BadRequest.isRedirection).to(beFalse()) } } context("when the code between 400 and 499"){ it("then should have a client error status"){ - expect(HTTPStatusCode.Code307TemporaryRedirect.isClientError).to(beFalse()) - expect(HTTPStatusCode.Code400BadRequest.isClientError).to(beTrue()) - expect(HTTPStatusCode.Code500InternalServerError.isClientError).to(beFalse()) - expect(HTTPStatusCode.Code429TooManyRequests.isClientError).to(beTrue()) + expect(HTTPStatusCode.code307TemporaryRedirect.isClientError).to(beFalse()) + expect(HTTPStatusCode.code400BadRequest.isClientError).to(beTrue()) + expect(HTTPStatusCode.code500InternalServerError.isClientError).to(beFalse()) + expect(HTTPStatusCode.code429TooManyRequests.isClientError).to(beTrue()) } it("is an error") { - expect(HTTPStatusCode.Code307TemporaryRedirect.isError).to(beFalse()) - expect(HTTPStatusCode.Code400BadRequest.isError).to(beTrue()) + expect(HTTPStatusCode.code307TemporaryRedirect.isError).to(beFalse()) + expect(HTTPStatusCode.code400BadRequest.isError).to(beTrue()) } } context("when the code between 500 and 599"){ it("then should have a server error status"){ - expect(HTTPStatusCode.Code417ExpectationFailed.isServerError).to(beFalse()) - expect(HTTPStatusCode.Code500InternalServerError.isServerError).to(beTrue()) + expect(HTTPStatusCode.code417ExpectationFailed.isServerError).to(beFalse()) + expect(HTTPStatusCode.code500InternalServerError.isServerError).to(beTrue()) } it("is an error"){ - expect(HTTPStatusCode.Code500InternalServerError.isError).to(beTrue()) + expect(HTTPStatusCode.code500InternalServerError.isError).to(beTrue()) } } } diff --git a/AstroTests/Unit Tests/Networking/NetworkRequestLoggerSpec.swift b/AstroTests/Unit Tests/Networking/NetworkRequestLoggerSpec.swift index f0ff004..da870aa 100644 --- a/AstroTests/Unit Tests/Networking/NetworkRequestLoggerSpec.swift +++ b/AstroTests/Unit Tests/Networking/NetworkRequestLoggerSpec.swift @@ -31,7 +31,7 @@ class NetworkServiceLoggerSpec: QuickSpec { var subject: NetworkServiceLogger! var networkService: NetworkService! var json: JSON! - var request: NSMutableURLRequest! + var request: URLRequest! var logRecorder: LogRecorder! beforeEach { @@ -39,11 +39,11 @@ class NetworkServiceLoggerSpec: QuickSpec { "field1": "value1", "field2": "value2" ] - request = NSMutableURLRequest(URL: NSURL(string: "https://example.com/logger/path")!) + request = URLRequest(url: URL(string: "https://example.com/logger/path")!) logRecorder = LogRecorder() Log.logger = logRecorder - Log.level = .Debug + Log.level = .debug networkService = NetworkService() @@ -52,7 +52,7 @@ class NetworkServiceLoggerSpec: QuickSpec { context("not started") { beforeEach { - stubAnyRequest().andReturn(.Code200OK).withJSON(json) + stubAnyRequest().andReturn(.code200OK).withJSON(json) networkService.requestData(request).waitUntilDone() } @@ -65,7 +65,7 @@ class NetworkServiceLoggerSpec: QuickSpec { beforeEach { subject.start() - stubAnyRequest().andReturn(.Code200OK).withJSON(json) + stubAnyRequest().andReturn(.code200OK).withJSON(json) networkService.requestData(request).waitUntilDone() } @@ -78,7 +78,7 @@ class NetworkServiceLoggerSpec: QuickSpec { logRecorder.messages.removeAll() subject.stop() - stubAnyRequest().andReturn(.Code200OK).withJSON(json) + stubAnyRequest().andReturn(.code200OK).withJSON(json) networkService.requestData(request).waitUntilDone() } @@ -92,9 +92,9 @@ class NetworkServiceLoggerSpec: QuickSpec { beforeEach { subject.start() - stubAnyRequest().andReturn(.Code200OK).withJSON(json) + stubAnyRequest().andReturn(.code200OK).withJSON(json) - NetworkService().requestData(request) + _ = NetworkService().requestData(request) } it("should log both send and receive messages") { diff --git a/AstroTests/Unit Tests/Networking/NetworkServiceSpec.swift b/AstroTests/Unit Tests/Networking/NetworkServiceSpec.swift index ebd3af2..8cdb105 100644 --- a/AstroTests/Unit Tests/Networking/NetworkServiceSpec.swift +++ b/AstroTests/Unit Tests/Networking/NetworkServiceSpec.swift @@ -33,7 +33,7 @@ class NetworkServiceSpec: QuickSpec { var subject: NetworkService! var userJSON: JSON! var userArrayJSON: JSON! - var request: NSMutableURLRequest! + var request: URLRequest! let expectedUser = User(userID: "1", email: "user@example.com") beforeEach { @@ -43,7 +43,7 @@ class NetworkServiceSpec: QuickSpec { "email": "user@example.com", ] userArrayJSON = [userJSON, userJSON] - request = NSMutableURLRequest(URL: NSURL(string: "https://example.com/path")!) + request = URLRequest(url: URL(string: "https://example.com/path")!) } describe(".requestJSONDictionary") { @@ -51,7 +51,7 @@ class NetworkServiceSpec: QuickSpec { describe("success") { beforeEach { - stubAnyRequest().andReturn(.Code200OK).withJSON(userJSON) + stubAnyRequest().andReturn(.code200OK).withJSON(userJSON) dictTask = subject.requestJSONDictionary(request) } @@ -60,14 +60,14 @@ class NetworkServiceSpec: QuickSpec { } it("should eventually return token JSON") { expect({ - dictTask.value != nil ? JSON.Dictionary(dictTask.value!.value) : nil + dictTask.value != nil ? JSON.dictionary(dictTask.value!.value) : nil }()).toEventually(equal(userJSON)) } } describe("401 Unauthorized") { beforeEach { - stubAnyRequest().andReturn(.Code401Unauthorized).withJSON(["Error": "Unauthorized"]) + stubAnyRequest().andReturn(.code401Unauthorized).withJSON(["Error": "Unauthorized"]) dictTask = subject.requestJSONDictionary(request) } @@ -99,7 +99,7 @@ class NetworkServiceSpec: QuickSpec { describe("invalid JSON in response") { beforeEach { - stubAnyRequest().andReturn(.Code200OK).withBody("not valid JSON!") + stubAnyRequest().andReturn(.code200OK).withBody("not valid JSON!") dictTask = subject.requestJSONDictionary(request) } @@ -113,7 +113,7 @@ class NetworkServiceSpec: QuickSpec { describe("received json [] instead of {}") { beforeEach { - stubAnyRequest().andReturn(.Code200OK).withJSON([]) + stubAnyRequest().andReturn(.code200OK).withJSON([]) dictTask = subject.requestJSONDictionary(request) } @@ -121,7 +121,7 @@ class NetworkServiceSpec: QuickSpec { expect(dictTask.state).toEventually(equal(TaskState.Rejected)) } it("should fail to parse json") { - let expectedError = JSON.Error.ValueNotConvertible(value: [], to: Swift.Dictionary) + let expectedError = JSON.Error.valueNotConvertible(value: [], to: Swift.Dictionary) expect({ dictTask.errorInfo?.error?.error as? JSON.Error }()).toEventually(equal(expectedError)) @@ -134,7 +134,7 @@ class NetworkServiceSpec: QuickSpec { context("Given a successful response (200 OK)") { context("with a valid array") { beforeEach { - stubAnyRequest().andReturn(.Code200OK).withJSON(userArrayJSON) + stubAnyRequest().andReturn(.code200OK).withJSON(userArrayJSON) arrayTask = subject.requestJSONArray(request) } it("then it should fulfill with the correct user JSON") { @@ -146,7 +146,7 @@ class NetworkServiceSpec: QuickSpec { } context("with an empty response") { beforeEach { - stubAnyRequest().andReturn(.Code200OK) + stubAnyRequest().andReturn(.code200OK) arrayTask = subject.requestJSONArray(request) } it("then the task should be rejected") { @@ -156,7 +156,7 @@ class NetworkServiceSpec: QuickSpec { } context("Given a failed status code (404 Not Found)") { beforeEach { - stubAnyRequest().andReturn(.Code404NotFound).withJSON(userJSON) + stubAnyRequest().andReturn(.code404NotFound).withJSON(userJSON) arrayTask = subject.requestJSONArray(request) } it("then task should be rejected") { @@ -166,7 +166,7 @@ class NetworkServiceSpec: QuickSpec { describe("Given a invalid json {} instead of []") { beforeEach { - stubAnyRequest().andReturn(.Code200OK).withJSON([:]) + stubAnyRequest().andReturn(.code200OK).withJSON([:]) arrayTask = subject.requestJSONArray(request) } it("task should be rejected") { @@ -180,7 +180,7 @@ class NetworkServiceSpec: QuickSpec { context("Given a successful response (200 OK)") { context("with a valid array") { beforeEach { - stubAnyRequest().andReturn(.Code200OK).withJSON(userArrayJSON) + stubAnyRequest().andReturn(.code200OK).withJSON(userArrayJSON) arrayTask = subject.requestJSONArray(request) } it("then it should fulfill with the correct user JSON") { @@ -192,7 +192,7 @@ class NetworkServiceSpec: QuickSpec { } context("with an empty response") { beforeEach { - stubAnyRequest().andReturn(.Code200OK) + stubAnyRequest().andReturn(.code200OK) arrayTask = subject.requestJSONArray(request) } it("then the task should be fulfilled") { @@ -206,7 +206,7 @@ class NetworkServiceSpec: QuickSpec { } context("Given a failed status code (404 Not Found)") { beforeEach { - stubAnyRequest().andReturn(.Code404NotFound).withJSON(userJSON) + stubAnyRequest().andReturn(.code404NotFound).withJSON(userJSON) arrayTask = subject.requestJSONArray(request) } it("then task should be rejected") { @@ -216,7 +216,7 @@ class NetworkServiceSpec: QuickSpec { describe("Given a invalid json {} instead of []") { beforeEach { - stubAnyRequest().andReturn(.Code200OK).withJSON([:]) + stubAnyRequest().andReturn(.code200OK).withJSON([:]) arrayTask = subject.requestJSONArray(request) } it("task should be rejected") { @@ -230,7 +230,7 @@ class NetworkServiceSpec: QuickSpec { context("given a successful response (200 OK)") { context("with a valid object") { beforeEach { - stubAnyRequest().andReturn(.Code200OK).withJSON(userJSON) + stubAnyRequest().andReturn(.code200OK).withJSON(userJSON) task = subject.requestJSON(request) } it("then it should fulfill with the correct JSON") { @@ -245,7 +245,7 @@ class NetworkServiceSpec: QuickSpec { } context("with an empty response") { beforeEach { - stubAnyRequest().andReturn(.Code200OK) + _ = stubAnyRequest().andReturn(.code200OK) task = subject.requestJSON(request) } it("then the task should be rejected") { @@ -255,7 +255,7 @@ class NetworkServiceSpec: QuickSpec { } context("with a failed status code (404 Not Found)") { beforeEach { - stubAnyRequest().andReturn(.Code404NotFound).withJSON(userJSON) + stubAnyRequest().andReturn(.code404NotFound).withJSON(userJSON) task = subject.requestJSON(request) } it("then task should be rejected") { @@ -279,7 +279,7 @@ class NetworkServiceSpec: QuickSpec { context("given a successful response (200 OK)") { context("with a valid object") { beforeEach { - stubAnyRequest().andReturn(.Code200OK).withJSON(userJSON) + stubAnyRequest().andReturn(.code200OK).withJSON(userJSON) task = subject.request(request) } it("then it should fulfill with the correct JSON") { @@ -295,7 +295,7 @@ class NetworkServiceSpec: QuickSpec { context("with an empty response") { beforeEach { - stubAnyRequest().andReturn(.Code200OK) + _ = stubAnyRequest().andReturn(.code200OK) task = subject.request(request) } it("then the task should be rejected") { @@ -305,7 +305,7 @@ class NetworkServiceSpec: QuickSpec { } context("with a failed status code (404 Not Found)") { beforeEach { - stubAnyRequest().andReturn(.Code404NotFound).withJSON(userJSON) + stubAnyRequest().andReturn(.code404NotFound).withJSON(userJSON) task = subject.request(request) } it("then task should be rejected") { @@ -318,7 +318,7 @@ class NetworkServiceSpec: QuickSpec { context("Given a successful response (200 OK)") { context("with a valid object") { beforeEach { - stubAnyRequest().andReturn(.Code200OK).withJSON(userJSON) + stubAnyRequest().andReturn(.code200OK).withJSON(userJSON) task = subject.request(request) } it("then it should fulfills with the correct JSON") { @@ -333,7 +333,7 @@ class NetworkServiceSpec: QuickSpec { } context("with an empty response") { beforeEach { - stubAnyRequest().andReturn(.Code200OK) + _ = stubAnyRequest().andReturn(.code200OK) task = subject.request(request) } it("then the task should be fulfilled") { @@ -347,7 +347,7 @@ class NetworkServiceSpec: QuickSpec { } context("Given a failed status code (404 Not Found)") { beforeEach { - stubAnyRequest().andReturn(.Code404NotFound).withJSON(userJSON) + stubAnyRequest().andReturn(.code404NotFound).withJSON(userJSON) task = subject.request(request) } it("then task should be rejected") { @@ -360,7 +360,7 @@ class NetworkServiceSpec: QuickSpec { context("Given a successful response (200 OK)") { context("with a valid array") { beforeEach { - stubAnyRequest().andReturn(.Code200OK).withJSON(userArrayJSON) + stubAnyRequest().andReturn(.code200OK).withJSON(userArrayJSON) task = subject.request(request) } it("then it should fulfill with the correct Users") { @@ -372,7 +372,7 @@ class NetworkServiceSpec: QuickSpec { } context("with an empty response") { beforeEach { - stubAnyRequest().andReturn(.Code200OK) + _ = stubAnyRequest().andReturn(.code200OK) task = subject.request(request) } it("then the task should be rejected") { @@ -382,7 +382,7 @@ class NetworkServiceSpec: QuickSpec { } context("Given a failed status code (404 Not Found)") { beforeEach { - stubAnyRequest().andReturn(.Code404NotFound).withJSON(userJSON) + stubAnyRequest().andReturn(.code404NotFound).withJSON(userJSON) task = subject.request(request) } it("then task should be rejected") { @@ -395,7 +395,7 @@ class NetworkServiceSpec: QuickSpec { context("Given a successful response (200 OK)") { context("with a valid array") { beforeEach { - stubAnyRequest().andReturn(.Code200OK).withJSON(userArrayJSON) + stubAnyRequest().andReturn(.code200OK).withJSON(userArrayJSON) task = subject.request(request) } it("then it should fulfill with the correct user") { @@ -407,7 +407,7 @@ class NetworkServiceSpec: QuickSpec { } context("with an empty response") { beforeEach { - stubAnyRequest().andReturn(.Code200OK) + _ = stubAnyRequest().andReturn(.code200OK) task = subject.request(request) } it("then the task should be fulfilled") { @@ -421,7 +421,7 @@ class NetworkServiceSpec: QuickSpec { } context("Given a failed status code (404 Not Found)") { beforeEach { - stubAnyRequest().andReturn(.Code404NotFound).withJSON(userJSON) + stubAnyRequest().andReturn(.code404NotFound).withJSON(userJSON) task = subject.request(request) } it("then task should be rejected") { diff --git a/AstroTests/Unit Tests/Networking/User.swift b/AstroTests/Unit Tests/Networking/User.swift index 82d4616..53af4eb 100644 --- a/AstroTests/Unit Tests/Networking/User.swift +++ b/AstroTests/Unit Tests/Networking/User.swift @@ -19,22 +19,22 @@ struct User { extension User: JSONDecodable { init(json: JSON) throws { // Extract id as a string or a int - if let userID = try? json.string("id") { + if let userID = try? json.getString(at: "id") { self.userID = userID } else { - let userID = try json.int("id") + let userID = try json.getInt(at: "id") self.userID = String(userID) } - email = try json.string("email") + email = try json.getString(at: "email") } } extension User: JSONEncodable { func toJSON() -> JSON { - return .Dictionary([ - "id": .String(userID), - "email": .String(email) + return .dictionary([ + "id": .string(userID), + "email": .string(email) ]) } } diff --git a/AstroTests/Unit Tests/SpecHelpers.swift b/AstroTests/Unit Tests/SpecHelpers.swift index 0a04827..6498f9a 100644 --- a/AstroTests/Unit Tests/SpecHelpers.swift +++ b/AstroTests/Unit Tests/SpecHelpers.swift @@ -31,7 +31,10 @@ extension Task { // Improved DSL for Nocilla func stubRoute(_ route: Route) -> LSStubRequestDSL { - return stubRequest(route.method.rawValue, route.URL.absoluteString).withHeaders(route.URLRequest.allHTTPHeaderFields).withBody(route.URLRequest.HTTPBody) + let URLRequest = try! route.asURLRequest() + return stubRequest(route.method.rawValue, route.URL.absoluteString as NSString) + .withHeaders(URLRequest.allHTTPHeaderFields) + .withBody(URLRequest.httpBody! as NSData) } extension LSStubRequestDSL { @@ -41,9 +44,9 @@ extension LSStubRequestDSL { } extension LSStubResponseDSL { - func withJSON(_ json: JSON) -> LSStubResponseDSL { - let body = try? json.serialize() ?? Data() - return withHeader("Content-Type", "application/json").withBody(body) + @discardableResult func withJSON(_ json: JSON) -> LSStubResponseDSL { + let body = (try? json.serialize()) ?? Data() + return withHeader("Content-Type", "application/json").withBody(body as NSData) } } diff --git a/AstroTests/Unit Tests/UI/LayoutLabelSpec.swift b/AstroTests/Unit Tests/UI/LayoutLabelSpec.swift index f1e81d2..376266b 100644 --- a/AstroTests/Unit Tests/UI/LayoutLabelSpec.swift +++ b/AstroTests/Unit Tests/UI/LayoutLabelSpec.swift @@ -13,7 +13,7 @@ import Quick import Nimble @testable import Astro -let mockFrame = CGRectMake(1, 2, 3, 4) +let mockFrame = CGRect(x: 1, y:2, width: 3, height:4) class LayoutLabelSpec: QuickSpec { override func spec() { @@ -55,8 +55,8 @@ class LayoutLabelSpec: QuickSpec { it("then contentSize should remain the same") { //Act - let contentSize = label.intrinsicContentSize() - let comparableContentSize = comparableLabel.intrinsicContentSize() + let contentSize = label.intrinsicContentSize + let comparableContentSize = comparableLabel.intrinsicContentSize //Assert expect(contentSize.height).to(equal(comparableContentSize.height)) @@ -72,8 +72,8 @@ class LayoutLabelSpec: QuickSpec { it("then contentSize should be 1pt taller") { //Act - let contentSize = label.intrinsicContentSize() - let comparableContentSize = comparableLabel.intrinsicContentSize() + let contentSize = label.intrinsicContentSize + let comparableContentSize = comparableLabel.intrinsicContentSize //Assert expect(contentSize.height).to(equal(comparableContentSize.height+1)) @@ -90,8 +90,8 @@ class LayoutLabelSpec: QuickSpec { it("then content size should remain the same") { //Act - let contentSize = label.intrinsicContentSize() - let comparableContentSize = comparableLabel.intrinsicContentSize() + let contentSize = label.intrinsicContentSize + let comparableContentSize = comparableLabel.intrinsicContentSize //Assert expect(contentSize.height).to(equal(comparableContentSize.height)) diff --git a/AstroTests/Unit Tests/UI/UIView+AstroGadgetsSpec.swift b/AstroTests/Unit Tests/UI/UIView+AstroGadgetsSpec.swift index 17d939d..0666142 100644 --- a/AstroTests/Unit Tests/UI/UIView+AstroGadgetsSpec.swift +++ b/AstroTests/Unit Tests/UI/UIView+AstroGadgetsSpec.swift @@ -19,12 +19,12 @@ class UIView_AstroGadgetsSpec: QuickSpec { let view = UIView() beforeEach(){ // Arrange - view.frame = CGRectMake(1, 2, 3, 4) + view.frame = CGRect(x: 1, y: 2, width: 3, height: 4) } context("when updating a frame property") { it("then the frameSize should match") { // Arrange - let expectedSize = CGSizeMake(23, 45) + let expectedSize = CGSize(width: 23, height: 45) // Act view.frameSize = expectedSize // Assert @@ -51,7 +51,7 @@ class UIView_AstroGadgetsSpec: QuickSpec { } it ("then the frameOrigin should match") { // Arrange - let expectedOrigin = CGPointMake(67,89) + let expectedOrigin = CGPoint(x: 67, y: 89) // Act view.frameOrigin = expectedOrigin // Assert From 1f010bc2d10624225e95d493341ce34acebc7f46 Mon Sep 17 00:00:00 2001 From: stephengazzard Date: Wed, 26 Oct 2016 11:43:38 -0600 Subject: [PATCH 08/11] Update test syntax --- .../Networking/NetworkServiceSpec.swift | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/AstroTests/Unit Tests/Networking/NetworkServiceSpec.swift b/AstroTests/Unit Tests/Networking/NetworkServiceSpec.swift index 8cdb105..4eb965e 100644 --- a/AstroTests/Unit Tests/Networking/NetworkServiceSpec.swift +++ b/AstroTests/Unit Tests/Networking/NetworkServiceSpec.swift @@ -75,7 +75,9 @@ class NetworkServiceSpec: QuickSpec { expect(dictTask.state).toEventually(equal(TaskState.Rejected)) } it("errors on status code") { - expect((dictTask.errorInfo?.error?.error as? NSError)?.code).toEventually(equal(Error.Code.StatusCodeValidationFailed.rawValue), timeout: 1) + let expectedError: AFError = AFError.responseValidationFailed(reason: .unacceptableStatusCode(code: HTTPStatusCode.code401Unauthorized.rawValue)) + var error: AFError? = dictTask.errorInfo?.error?.error as? AFError +// expect(error).toEventually(equal(expectedError), timeout: 1) } } @@ -99,7 +101,7 @@ class NetworkServiceSpec: QuickSpec { describe("invalid JSON in response") { beforeEach { - stubAnyRequest().andReturn(.code200OK).withBody("not valid JSON!") + _ = stubAnyRequest().andReturn(.code200OK).withBody("not valid JSON!" as NSString) dictTask = subject.requestJSONDictionary(request) } @@ -146,7 +148,7 @@ class NetworkServiceSpec: QuickSpec { } context("with an empty response") { beforeEach { - stubAnyRequest().andReturn(.code200OK) + _ = stubAnyRequest().andReturn(.code200OK) arrayTask = subject.requestJSONArray(request) } it("then the task should be rejected") { @@ -192,7 +194,7 @@ class NetworkServiceSpec: QuickSpec { } context("with an empty response") { beforeEach { - stubAnyRequest().andReturn(.code200OK) + _ = stubAnyRequest().andReturn(.code200OK) arrayTask = subject.requestJSONArray(request) } it("then the task should be fulfilled") { @@ -437,14 +439,14 @@ class NetworkServiceSpec: QuickSpec { extension JSON.Error: Equatable {} public func ==(a: JSON.Error, b: JSON.Error) -> Bool { switch (a, b) { - case (.ValueNotConvertible(let lhsValue, let lhsTo), .ValueNotConvertible(let rhsValue, let rhsTo)): + case (.valueNotConvertible(let lhsValue, let lhsTo), .valueNotConvertible(let rhsValue, let rhsTo)): return rhsValue == lhsValue && rhsTo == lhsTo - case (.UnexpectedSubscript(let lhsType), .UnexpectedSubscript(let rhsType)): + case (.unexpectedSubscript(let lhsType), .unexpectedSubscript(let rhsType)): return lhsType == rhsType - case (.KeyNotFound(let lhsKey), .KeyNotFound(let rhsKey)): + case (.keyNotFound(let lhsKey), .keyNotFound(let rhsKey)): return lhsKey == rhsKey - case (.IndexOutOfBounds(let lhsIndex), .IndexOutOfBounds(let rhsIndex)): + case (.indexOutOfBounds(let lhsIndex), .indexOutOfBounds(let rhsIndex)): return lhsIndex == rhsIndex default: return false } From 714666202cfedb586d03914790dee9606972bb14 Mon Sep 17 00:00:00 2001 From: stephengazzard Date: Wed, 26 Oct 2016 12:23:35 -0600 Subject: [PATCH 09/11] Make AFError Equatable to catch last unit test --- .../Networking/NetworkServiceSpec.swift | 117 +++++++++++++++++- 1 file changed, 111 insertions(+), 6 deletions(-) diff --git a/AstroTests/Unit Tests/Networking/NetworkServiceSpec.swift b/AstroTests/Unit Tests/Networking/NetworkServiceSpec.swift index 4eb965e..9fd8cb5 100644 --- a/AstroTests/Unit Tests/Networking/NetworkServiceSpec.swift +++ b/AstroTests/Unit Tests/Networking/NetworkServiceSpec.swift @@ -64,7 +64,7 @@ class NetworkServiceSpec: QuickSpec { }()).toEventually(equal(userJSON)) } } - + describe("401 Unauthorized") { beforeEach { stubAnyRequest().andReturn(.code401Unauthorized).withJSON(["Error": "Unauthorized"]) @@ -75,12 +75,11 @@ class NetworkServiceSpec: QuickSpec { expect(dictTask.state).toEventually(equal(TaskState.Rejected)) } it("errors on status code") { - let expectedError: AFError = AFError.responseValidationFailed(reason: .unacceptableStatusCode(code: HTTPStatusCode.code401Unauthorized.rawValue)) - var error: AFError? = dictTask.errorInfo?.error?.error as? AFError -// expect(error).toEventually(equal(expectedError), timeout: 1) + let expectedError = AFError.responseValidationFailed(reason: .unacceptableStatusCode(code: HTTPStatusCode.code401Unauthorized.rawValue)) + expect(dictTask.errorInfo?.error?.error as? AFError).toEventually(equal(expectedError), timeout: 1) } } - + describe("connection error") { var connectionError: NSError! @@ -98,7 +97,7 @@ class NetworkServiceSpec: QuickSpec { expect(dictTask.errorInfo?.error?.error as? NSError).toEventually(equal(connectionError)) } } - + describe("invalid JSON in response") { beforeEach { _ = stubAnyRequest().andReturn(.code200OK).withBody("not valid JSON!" as NSString) @@ -451,3 +450,109 @@ public func ==(a: JSON.Error, b: JSON.Error) -> Bool { default: return false } } + +extension AFError: Equatable {} +public func == (left: AFError, right: AFError) -> Bool { + switch (left, right) { + case (.invalidURL(_), .invalidURL(_)): + return true + case (.parameterEncodingFailed(let leftReason), .parameterEncodingFailed(let rightReason)): + return leftReason == rightReason + case (.multipartEncodingFailed(let leftReason), .multipartEncodingFailed(let rightReason)): + return leftReason == rightReason + case (.responseValidationFailed(let leftReason), .responseValidationFailed(let rightReason)): + return leftReason == rightReason + case (.responseSerializationFailed(let leftReason), .responseSerializationFailed(let rightReason)): + return leftReason == rightReason + default: + return false + } +} + +extension AFError.ParameterEncodingFailureReason: Equatable {} +public func == (left: AFError.ParameterEncodingFailureReason, right: AFError.ParameterEncodingFailureReason) -> Bool { + switch (left, right) { + case (.missingURL, .missingURL): + return true + case (.jsonEncodingFailed(_), .jsonEncodingFailed(_)): + return true + case (.propertyListEncodingFailed(_), .propertyListEncodingFailed(_)): + return true + default: + return false + } +} + +extension AFError.MultipartEncodingFailureReason: Equatable {} +public func == (left: AFError.MultipartEncodingFailureReason, right: AFError.MultipartEncodingFailureReason) -> Bool { + switch (left, right) { + case (.bodyPartURLInvalid(let leftURL), .bodyPartURLInvalid(let rightURL)): + return leftURL == rightURL + case (.bodyPartFilenameInvalid(let leftURL), .bodyPartFilenameInvalid(let rightURL)): + return leftURL == rightURL + case (.bodyPartFileNotReachable(let leftURL), .bodyPartFileNotReachable(let rightURL)): + return leftURL == rightURL + case (.bodyPartFileNotReachableWithError(let leftURL, _), .bodyPartFileNotReachableWithError(let rightURL, _)): + return leftURL == rightURL + case (.bodyPartFileIsDirectory(let leftURL), .bodyPartFileIsDirectory(let rightURL)): + return leftURL == rightURL + case (.bodyPartFileSizeNotAvailable(let leftURL), .bodyPartFileSizeNotAvailable(let rightURL)): + return leftURL == rightURL + case (.bodyPartFileSizeQueryFailedWithError(let leftURL, _), .bodyPartFileSizeQueryFailedWithError(let rightURL, _)): + return leftURL == rightURL + case (.bodyPartInputStreamCreationFailed(let leftURL), .bodyPartInputStreamCreationFailed(let rightURL)): + return leftURL == rightURL + case (.outputStreamCreationFailed(let leftURL), .outputStreamCreationFailed(let rightURL)): + return leftURL == rightURL + case (.outputStreamFileAlreadyExists(let leftURL), .outputStreamFileAlreadyExists(let rightURL)): + return leftURL == rightURL + case (.outputStreamURLInvalid(let leftURL), .outputStreamURLInvalid(let rightURL)): + return leftURL == rightURL + case (.outputStreamWriteFailed(_), .outputStreamWriteFailed(_)): + return true + case (.inputStreamReadFailed(_), .inputStreamReadFailed(_)): + return true + default: + return false + } +} + +extension AFError.ResponseValidationFailureReason: Equatable {} +public func == (left: AFError.ResponseValidationFailureReason, right: AFError.ResponseValidationFailureReason) -> Bool { + switch (left, right) { + case (.dataFileNil, .dataFileNil): + return true + case (.dataFileReadFailed(let leftURL), .dataFileReadFailed(let rightURL)): + return leftURL == rightURL + case (.missingContentType(let leftContentTypes), .missingContentType(let rightContentTypes)): + return leftContentTypes == rightContentTypes + case (.unacceptableContentType(let leftContentTypes, let leftResponseContentTypes), .unacceptableContentType(let rightContentTypes, let rightResponseContentTypes)): + return leftContentTypes == rightContentTypes && leftResponseContentTypes == rightResponseContentTypes + case (.unacceptableStatusCode(let leftStatusCode), .unacceptableStatusCode(let rightStatusCode)): + return rightStatusCode == leftStatusCode + default: + return false + } +} + +extension AFError.ResponseSerializationFailureReason: Equatable {} +public func == (left: AFError.ResponseSerializationFailureReason, right: AFError.ResponseSerializationFailureReason) -> Bool { + switch (left, right) { + case (.inputDataNil, .inputDataNil): + return true + case (.inputDataNilOrZeroLength, .inputDataNilOrZeroLength): + return true + case (.inputFileNil, .inputFileNil): + return true + case (.inputFileReadFailed(let leftURL), .inputFileReadFailed(let rightURL)): + return leftURL == rightURL + case (.stringSerializationFailed(let leftEncoding), .stringSerializationFailed(let rightEncoding)): + return leftEncoding == rightEncoding + case (.jsonSerializationFailed(_), .jsonSerializationFailed(_)): + return true + case (.propertyListSerializationFailed(_), .propertyListSerializationFailed(_)): + return true + default: + return false + } +} From e73b56674b85a594d4a74545b43cc115bb62b6e2 Mon Sep 17 00:00:00 2001 From: stephengazzard Date: Wed, 26 Oct 2016 12:32:42 -0600 Subject: [PATCH 10/11] Update pod version --- Astro.podspec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Astro.podspec b/Astro.podspec index eb45937..cc4d3b2 100644 --- a/Astro.podspec +++ b/Astro.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = "Astro" - s.version = "2.0.0" + s.version = "3.0.0" s.summary = "A RoboPod containing a small collection of utilities for project reuse" s.homepage = "https://RobotsAndPencils.com" s.license = { @@ -25,7 +25,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI "Chad Sykes" => "Chad.Sykes@RobotsAndPencils.com", "Colin Gislason" => "Colin.Gislason@RobotsAndPencils.com", "Dominic Pepin" => "Dominic.Pepin@RobotsAndPencils.com", - "Michael Beaureguard" => "Michael.Beauregard@RobotsAndPencils.com" + "Michael Beaureguard" => "Michael.Beauregard@RobotsAndPencils.com", + "Stephen Gazzard" => "Stephen.Gazzard@RobotsAndPencils.com" } s.source = { :git => "https://github.com/RobotsAndPencils/Astro.git", :tag => s.version.to_s } From 023c41a4899baaf8c0548661332b72b72ef025ae Mon Sep 17 00:00:00 2001 From: stephengazzard Date: Thu, 27 Oct 2016 14:28:36 -0600 Subject: [PATCH 11/11] Some #picky cleanup --- Astro/Networking/NetworkService.swift | 2 +- Astro/UI/UICollectionView+AstroGadgets.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Astro/Networking/NetworkService.swift b/Astro/Networking/NetworkService.swift index c9bfb4d..425bac0 100644 --- a/Astro/Networking/NetworkService.swift +++ b/Astro/Networking/NetworkService.swift @@ -352,7 +352,7 @@ open class NetworkService: NetworkServiceType { .responseData { response in try? NetworkService.postNotification(NetworkService.Notifications.DidReceive, request: URLRequest, response: response) - guard let data = response.result.value , response.result.isSuccess else { + guard let data = response.result.value, response.result.isSuccess else { // We should always have an error in the non success case but use AssertionError to avoid a bang (!) let error: Error = response.result.error ?? AssertionError() reject(NetworkError(response: response, error: error)) diff --git a/Astro/UI/UICollectionView+AstroGadgets.swift b/Astro/UI/UICollectionView+AstroGadgets.swift index 71b6814..9c61bcb 100644 --- a/Astro/UI/UICollectionView+AstroGadgets.swift +++ b/Astro/UI/UICollectionView+AstroGadgets.swift @@ -21,7 +21,7 @@ public extension UICollectionView { - parameter cellType: The cell subclass type that conforms to the ReusableView protocol */ public func register(_ cellType: T.Type) where T: ReusableView { - self.register(cellType.self, forCellWithReuseIdentifier: cellType.defaultReuseIdentifier) + register(cellType.self, forCellWithReuseIdentifier: cellType.defaultReuseIdentifier) } /** @@ -33,7 +33,7 @@ public extension UICollectionView { public func register(_ cellType: T.Type) where T: ReusableView, T: NibLoadableView { let bundle = Bundle(for: cellType.self) let nib = UINib(nibName: cellType.nibName, bundle: bundle) - self.register(nib, forCellWithReuseIdentifier: cellType.defaultReuseIdentifier) + register(nib, forCellWithReuseIdentifier: cellType.defaultReuseIdentifier) } /**